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

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

Javascript form submit and radio buttons?
When this form is submitted, it is automatically resubmitted using JS.

All my fields are carr

Dynamic Data + Sql Server 2005 Enterprise?
Hi! I have just started to learn ASP.NET, and it looks like it is quite a lot to learn. Im not reall

Ten Operator Syntax
Hi Guys,

I can't figure out why i am getting a parse error with this basic ten op code:

scandir clients directory
hi,
how can i scandir the clients directory? i need a script that when i click a button it will u

SESSION question
I am building an application , a directory for auctions.
For SEO i made a script which copies a p

Local file browser with php
Halo..

So this is what i want to create. I have a folder that i share and it has many movies.

please, need help coding this voting for your favorite car polling system.
hi, my code needs a lot of work, but i want to be able to let users vote on their favorite car, upda

SELECT * FROM users WHERE Users are not in Blocked
How do I select all users from users table where there users_id is not stored in the block table

Operating System
How in PHP or other language can I detect Operating system, ie Windows XP Home, Windows 7 Ultimate,

PHP Session Issue
I'm having an issue with one section on my website dealing with sessions. Now I know that myself and

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