Re: Retrieving Data To Edit

From: Date: Fri, 09 Jul 2004 14:47:50 +0000
Subject: Re: Retrieving Data To Edit
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190067@lists.php.net to get a copy of this message
I'm getting closer...! I SELECT: $sql = "SELECT UserFirstName FROM RegisteredMembers WHERE UserID='$_POST[TXT_UserID]'"; $result5 = mysql_query($sql) or die ("error: couldn't select UserID from database. Please e-mail: business.support@arraspeople.co.uk with this error message."); while($row = mysql_fetch_array($result5)) { $User=$row["UserFirstName"]; $UserFurtherComments=$row["FurtherComments"]; } I then use a form: echo "<tr>"; echo "<td>a little about me:</td>"; echo "<td><input type = 'text' name = 'TXT_FurtherComments' value='FurtherComments field should appear here'></td>"; echo "<td>20 characters max</td>"; echo "</tr>"; But if is use "value='$UserFurtherComments' nothing appears in the form field, even though the database holds a value in that field. What am I doing wrong...? -- ----------------------------- Michael Mason Arras People www.arraspeople.co.uk ----------------------------- "Harlequin" <michael.mason@arraspeople.co.uk> wrote in message news:20040709133858.22918.qmail@pb1.pair.com... > 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... > > -- > ----------------------------- > Michael Mason > Arras People > www.arraspeople.co.uk > ----------------------------- >

« previous php.general (#190067) next »