Ok, my bad..
I was going to fast and didn't realize i missed '$' sign...
here you go, instead of..
Code:
if (!data){echo("
Error: " . mysql_error() ."</p>"); exit();}
try...
Code:
if (!$data) error_message (sql_error());
The reason why we added $ there is because data is a variable and not constant, that's why you see the error message - Use of undefined constant data .
Hope that helps..