Hi there!
I suspect you have an error in your SQL query. You could insert an echo $sql."<br>";
right before your mysql_query
to check, if the query is correct.
Maybe the problem lies with the session, did you call session_start()
beforehand?
Hope that helps somewhat. Happy coding! :)