Re: Retrieving Data To Edit
| From: | Daniel Kullik | Date: | Fri, 09 Jul 2004 14:58:05 +0000 |
| Subject: | Re: Retrieving Data To Edit | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-190070@lists.php.net to get a copy of this message | ||
Harlequin wrote:
This is really confusing and I'm sure very simple to achieve. I already have values selected that I want to open and edit: $sql = "SELECT * FROM RegisteredMembers WHERE UserID='$_POST[TXT_UserID]'"; I basically want to recall these values on screen for the user to edit themselves. Once I've achieved that I'm assuming that I simply use an INSERT command but need to achieve the first step first of calling the data up...Did you define a constant named 'TXT_UserID'? If 'TXT_UserID' is the name of a form-element you might try this instead of your posted line of code: [code] $sql = sprintf( 'SELECT * FROM RegisteredMembers WHERE UserID = "%s"', $_POST['TXT_UserID'] ); [/code] (So maybe you just forgot some quotation-marks (-:) Daniel -- WWE e-commerce IT GmbH Eiffestrasse 462, D-20537 Hamburg Tel.: +49-40-2530659-0, Fax: +49-40-2530659-50