Im getting the following error:
You have an error in your SQL syntax near 'Resource id #2' at line 1
This is my code:
<?
session_start();
mysql_connect("localhost", "root", "");
mysql_select_db("users");
$result = mysql_query("select * FROM users WHERE Username =
'$valid_user'");
$array = mysql_fetch_array($result);
echo $valid_user. "<p>";
echo $array['Password']. "<p>";
echo $array['Surname']. "<p>";
echo $array['Firstname']. "<p>";
echo $array['Age']. "<p>";
echo $array['Sex']. "<p>";
mysql_query($result) or die (mysql_error());
?>