Jump to content

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/178293-why-do-i-get-this-error/
Share on other sites

i believe i see you with the same thread at least once a day .. you should really save yourself some time and learn why these errors are occurring so you can prevent or rectify them yourself.  i know this is a help forum, and i wouldn't want to take away from that, but you should really look into Parse Errors if you plan on continuing with PHP in the future.

 

just an observation.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.