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

Problem assigning value to variable in "IF" function
Does this script makes sense? I am trying to take the value that is set to "authenticat" a

I need help on this PHP code
Hi everybody, I made some kind of mistake while editing the code below. As you see, at the 3 row my

How to replace search button with link?
hi to everbody.
i have a search submit form and button like this :

<form id="f

Undefined index on my form
ok im getting Undefined index on this line.. print_r($_REQUEST['form']);

below is the full sc

Basic Forum Tutorial
Hi, I'm new to PHP. I want to build a basic forum for my site using PHP and MySQL. I've searched t

ereg_replace in Wordpress
Heya - so I'm working on this site: http://world-of-smiles.theportlandco.com/new-patients

The

Help me with some material on Open Text Overview.
Hi Experts,
Please help me out with some material on Open Text. I have been supporting AP Workf

how to export excel file in same server
My first post - php newbie, so appreciate your support.

I'm currently using headers to save w

Loops and Classes
I am making a template system and everything seems to be going well up until I have to loop in a var

Checking BOM Authorization Group
Hai Friends,

I have developed a mulitilevel BOM display report. End users have been assig

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