I keep on getting Parse error: syntax error, unexpected T_VARIABLE in /home/societies/ppe/pubwww/index.php on line 1 The code is as follows: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><?phpglobal $db;$db = mysql_connect("localhost", "ppe_admin", "aw3421");mysql_select_db ("ppe",$db);include("main.php");function doMenuItem($url, $title){ echo "<a class=\"titlelink\" href=\"$url\">$title</a>\n";}?><head><link rel="shortcut icon" href="http://www.umsu.manchester.ac.uk/ppe/favicon.ico" ><title>Politics Philosophy and Economics Society</title><meta http-equiv="content- type" content="text/html; charset=iso-8859-1" /><meta name="description" content="Your website description goes here" /><meta name="keywords" content="your,keywords,goes,here" /><link rel="stylesheet" href="ppe.css" type="text/css" media="screen,projection" /></head><body><div id="container" ><div id="header"><h1>Politics Philosophy and Economics Society </h1><h2><em>"Concordia res parvae crescent"</em> - Work together to accomplish more</h2></div><div id="navigation"><ul><li class="selected"><a href="index.php">HOME</a></li><li><a href="society/index.php">THE SOCIETY</a></li><li><a href="mentoring/index.php">MENTORING</a></li><li><a href="course/index.php">THE COURSE</a></li><li><a href="social/index.php">SOCIAL</a></li><li><a href="links.html">LINKS</a></li></ul></div><div id="content"><h2>Welcome to the brand new PPE Society website </h2> <p>
Two things. If the spacing is all intact <?phpglobal $db;$db = mysql_connect("localhost", "ppe_admin", "aw3421"); should be <?php global $db;$db = mysql_connect("localhost", "ppe_admin", "aw3421"); Second. Please change your MySQL password ASAP.
(password changed) I made the edit you suggested, but I still get the same message. Could anything else be the problem?
you should have a space here <?phpglobal $db;$db = mysql_connect("localhost", "ppe_admin", "aw3421"); PHP: <?php global $db;$db = mysql_connect("********", "***", "***"); ?> PHP: php and global should not stick together..
It is very hard to follow your code mate. The problem is that you have a missing ";" or a missing "}" It may very well be in the main.php file. I suggest you start commenting all your PHP code by // and than restore them block by block and figure out where the problem is
Can you copy and paste the file to a text file and link to it? Maybe that would be helpful. Changing the passwords first of course.