I've been getting an error message for the following code:
Code:
<?php
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS)
or die('Could not connect to MySQL database. ' . mysql_error());
mysql_select_db(SQL_DB,$conn);
if (isset($_GET['u']))
{
$uid = $_GET['u'];
$sql = "SELECT * FROM ml_users WHERE user_id = '$uid';";
$result = mysql_query($sql)
or die('Invalid query: ' . mysql_error());
if (mysql_num_rows($result)) {
$row = mysql_fetch_array($result);
$e-mail = $row['e-mail'];
} else {
$e-mail = "";
}
}
?>
Code:
[05-Jul-2008 01:28:42] PHP Parse error: parse error, unexpected '=' in /_test/mailings/user.php on line 32
Line 32 would be this one:
Code:
$e-mail = $row['e-mail'];
Does anyone have a clue as what's wrong here?