Talha Habib Talha Habib - 6 months ago 11
SQL Question

Can't update record in mysql

My query returns me error, Please let me know what i'm doing wrong

$q="UPDATE from 'id' SET 'pass'='$pass1' where 'name'='$user1'";

Answer

your sql is wrong:

$q="UPDATE from 'id' SET 'pass'='$pass1' where 'name'='$user1'";

it should be something like:

$q="UPDATE id SET 'pass'='$pass1' where 'name'='$user1'";