How i can edit data of mysql?
I make a form in (dreamweaver) with php and html. I fill the form with the data and insert in my mysql database(wich is on a server).
But now I want to edit the data that i already insert. Send me some scripts
- Jeffrey FLv 61 decade agoFavorite Answer
ok, really HIGH level pseudo code......
*create a form that will submit values to search for
*the retrieved data will come back to a form SIMILAR if not the same as your entry form
*Edit the data and post it back.......this is where it gets tricky.....
***you need to hold some data in a hidden HTML form field so you can re-find the data that is in your form......
**instead of doing and insert you UPDATE.....look up SQL UPDATE if you are unsure.
***Post back the original and changed data in a confirmation page and provide a link back to somewhere......
It's a good learning experience and a little help can go a long way.......try it and come back with more questions if you need to
- poorcocoboiboiLv 61 decade ago
You use the UPDATE SQL statement, outlined here:
Here's the PHP manual page on mysql_query():
- Andy TLv 71 decade ago
Isn't it the update SQL syntax?
- 1 decade ago
$value1 = $_GET['value1'];
$value2 = $_GET['value2'];
$sql = "UPDATE table SET value1 = '$value1' WHERE value2 = '$value2'";