MySQL query error

hello

I am getting this error :

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in …/…/… .php on line 20

this is my code :

[php]session_start();

if ($_SESSION[‘user’])
{

include "connect2.php";

	$user = ($_SESSION['user']);
	
		if ($result)
		{
		echo 'Could not run query: ' . mysql_error();
		exit;
		}
	
		$result = mysql_query("SELECT * FORM `$user` ");
	
		while($row = mysql_fetch_array($result))
		{
			echo $row['jaar'];	
		}

	}
	else
	{
	echo'Go away!';
	}  

?>[/php]

you have written form instead of from :smiley:

hello,

ty

i am still getting a error :

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in …/…/… .php on line 90

Sponsor our Newsletter | Privacy Policy | Terms of Service