English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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

2007-06-25 10:25:39 · 4 answers · asked by priscilla l 1 in Computers & Internet Programming & Design

4 answers

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

2007-06-25 14:14:26 · answer #1 · answered by Jeffrey F 6 · 0 0

You use the UPDATE SQL statement, outlined here:
http://dev.mysql.com/doc/refman/5.0/en/update.html

Here's the PHP manual page on mysql_query():
http://ca.php.net/manual/en/function.mysql-query.php

2007-06-25 17:32:59 · answer #2 · answered by poorcocoboiboi 6 · 1 0

Isn't it the update SQL syntax?

2007-06-25 17:33:16 · answer #3 · answered by Andy T 7 · 1 0

$value1 = $_GET['value1'];
$value2 = $_GET['value2'];

$sql = "UPDATE table SET value1 = '$value1' WHERE value2 = '$value2'";
mysql_query($sql);

2007-06-26 00:33:06 · answer #4 · answered by nigel 3 · 0 0

fedest.com, questions and answers