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

array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h

Sub-domains & calling unique content
Hello,

Is there a way use something similar to the $_GET function for a sub-domain? I to be a

bit of help needed
Im about to sort out my registration page for my website by customising a "registration" s

Got A Free Server :(
So I was given a free server

http://shopping.yahoo.com/p:Compaq%20ProLiant%201500%20Server:1

The control with ID 'ace' requires a ScriptManager on the page
I'm trying to add a simple AlwaysVisibleControlExtender to my page, but it's not working. I get the

Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members kno

How to kill asynchronous postback / current postback?
Hi,here is my problem:I have a web site with many pages of which some may take time to process resul

ok i need to join all this pages to make 1 neat code
i have 5 pages that make up my tv guide it works 100% but i want to make it 1 page if i can or 2, i

Help With editting and deleting form
So look at this image :

http://img194.imageshack.us/img194/8272/snapshot5f.png
This table

Comment Mod System Effects all rows...
Sorry if its confusing but here is whats going on: I have a table in a database called comments 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