Zaid Alshami Zaid Alshami - 2 months ago 18
PHP Question

How can I change my insert to update

This is my insert code in the php file. i want to update the data
what should i change?

mysql_query("INSERT INTO students( name,city,age,number,password,img)
values ( '$ename','$ecity','$eage','$enumber','$epassword','$imgname' )");


Use a standard MySQL UPDATE query:

UPDATE table_name SET column_name=value, column_name2=value2 WHERE standard_where_clause