Zaid Alshami Zaid Alshami - 1 year ago 81
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' )");

Answer Source

Use a standard MySQL UPDATE query:

UPDATE table_name SET column_name=value, column_name2=value2 WHERE standard_where_clause
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download