RE: [PHP-DB] Editing Module
| From: | Bastien Koert | Date: | Thu, 14 Oct 2004 02:42:22 +0000 |
| Subject: | RE: [PHP-DB] Editing Module | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-36789@lists.php.net to get a copy of this message | ||
Each record should have a unique id ( a primary key) keep that Pk with the record when editing, place it in a hidden field or attach it to the url, use a session...then you know which record you have been working on...then update the reocrd
update tablename set field1 = $value1...
bastien
From: "Ron Piggott" <ron.php@actsministries.org> To: "PHP DB" <php-db@lists.php.net> Subject: [PHP-DB] Editing Module Date: Wed, 13 Oct 2004 21:44:38 -0400 I am wanting to write an editing module for one of mySQL databases. It contains address and contact information. I am not exactly sure how to go about this. I get the idea --- search for the record but my question and where I stumble is this: How do you get the computer to remember the old record so after you search, find and display it, type in changes in a web form and then do the replace. I don't want to create a new record, but update the current record If my database looked like Ron / 12 Apple Street Gordon / 1435 Frank Street Tweedy Bird / 1 Here We Go Way and I want to update Gordon ... I know how to search and display it ... but how would go into Gordon and change his address? If any if you are able to respond please send a copy to my e-mail address ron.php@actsministries.org Thanks Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php