nzol — 2010-02-09T23:52:06-05:00 — #1
I want help on updating a row in a database.
I want it so a user can go to this page, see the information already there (got that far) and then make the changes, click submit and then I want it to update this to the database (Haven't got that far and thats what I want help with).
If anyone can help I will be very happy.
dan_grossman — 2010-02-10T00:48:43-05:00 — #2
What part do you need help with?
You construct an UPDATE query, a string, by placing the form data in the query. Then execute that query.
$sql = "UPDATE people SET name = '" . mysql_real_escape_string($_POST['name']) . "' WHERE id = " . (int)$_POST['id'];
You should ask this question in the forum for the language you're using if you need specific help.
mathbrick — 2010-02-18T12:54:14-05:00 — #3
Which programming language are you using?
nzol — 2010-02-18T13:05:27-05:00 — #4