What's wrong with my PHP code?

Ethan

New member
I'm getting a wrong number of paramters error from this php code. What's wrong with it?

mysql_connect ($dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());
mysql_select_db($dbname) or die(mysql_error());

$query = "SELECT email FROM members WHERE username='$username'";
$result = mysql_query($query);

while($row = mysql_fetch_assoc($result, MYSQL_ASSOC))
$email = $row['email'];
?>

10 points for the best working answer.
I know I'm missing a <?php. This is only the part of the code that is giving the error.
 
Back
Top