Hello everyone.
I am developing a site. I am no stranger to HTML code, as I have been writing it for years. But, this is my first foray into PHP and everytime I upload my site to my web server and run the pages, pretty much every page is coming up with a parse error. This page especially is coming up with a ‘Parse error: syntax error, unexpected T_VARIABLE, expecting ‘(‘ in /home/crescen9/public_html/logintop.php on line 9’. Here is the code for that page. I have been racking my brain trying to figure it out, it’s probably something stupid, but:
<?
session_start();
if (!isset($_SESSION[’email’])) {
mysql_connect(“localhost” , “*****“, “
or die(‘Database is not responding.’);
mysql_select_db(“crescen9_Bandusers”) or die(‘Unable to connect to database’);
$query= “SELECT first_name, band_name, cdsalecount FROM Userinfo”;
$result= ‘mysql_query($query)’;
while $row= ‘mysql_fetch_assoc($result)’;
{
echo “Name :$row[‘first_name’]}<br>” .
“Band Name : $row[‘band_name’] <br>” .
“CDs Sold To Date : $row[‘cdsalecount’] <br><br>”;
}
} else {
print'<html><body bgcolor=”#888888″><center><font size=”2″ face=”verdana”>You are not logged in! Click <a href=”login.php”>here to log in!<br>
Don’t have an account? <a href=”bandusersignup.php”>Sign Up Now!!!</a></font></center></body></html>’;
}
?>