Why do I get this error?


Posted on 16th Feb 2014 07:03 pm by admin

Error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/runevid/public_html/Quests/finished_tutorial.php on line 18

Did you know?Explore Trending and Topic pages for more stories like this.
Code:

<?php session_start(); ?>
<html>
<head>
<title>CrazyQuest - The online website for quests!</title>
<link type="text/css" href="style.css" rel="stylesheet" media="screen" />
</head>
<body>
<center>
<div id="container" >
<div id="banner" >
<img src="Images/logo.png" alt="" width="414" height="56" border="0" />
<h1>CrazyQuest</h1>

</div>

<?php

$username = "$_SESSION['username']";

//connect
$connect = mysql_connect("localhost","","") or die("Connection failed!");
mysql_select_db("") or die("Database fail!");

//write
$update_complete = mysql_query("UPDATE users SET quest1 = quest1 + 1 WHERE username='$username'");
$points = mysql_query("UPDATE users SET points = points + 3 WHERE username='$username'");

echo "<b><span style='color:green'>You have completed quest and gained 3 points!</span></b>";
}
?>

<div id="footer"><h1>Copyright 2009 - CrazyQuest</h1></div>
No comments posted yet

Your Answer:

Login to answer
236 Like 5 Dislike
Previous forums Next forums
Other forums

how do I show what a user have selected from a checkbox?
From my code below, how would i show which check boxes have been checked and which radio buttons sel

Displaying pictures
i have worked my way through storing images in directory and storing the location in mySQL db.Now i

User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b

PHP Code / Script To check weather the given email exists in a domain
Hi,

I want to implement the following in my web page

in sign up we will ask to enter u

JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using php
The page w

Posting Serialized Data Not Working
I am trying to send an object from one PHP file to another using POST. I serialize the object and th

Help with PHP and checkboxes
I am posting this for a friend of mine, i wrote a small script for her to process her form data to a

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

Remove letter from numeric textbox
I have a textbox that will search the employee database by entering in the employee ID and it will r

admin with my register system?
Hey i wana make it so i can make a admin level on my register system , I'm kinda new to php to im no

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash