I am having difficulty using column names and $_POST with mysql_query, as I am not very good at using quotes in PHP. Can someone please help me to rewrite following script? I will appreciate if I may have some tips on using variables, columns and $_POST with mysql_query.
here "slt" that is used within encrypt is also column name from the same table.
$result=mysql_query("SELECT * FROM root_user
WHERE root_name='".$_POST['userName']."'
AND ps_code = '".crypt($_POST['password'],slt)."'")
or die("database ERROR : ".mysql_error());