Truncated values in update form
| From: | Alberto Brea | Date: | Tue, 20 May 2003 14:59:29 +0000 |
| Subject: | Truncated values in update form | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-148286@lists.php.net to get a copy of this message | ||
I made an update form where I would like to show the values to be updated.
However, the values e.g. $fname and $lname truncate at the first space.
How can I do to show the whole value?
TIA
Alberto Brea
http://estudiobrea.com
My code so far is this:
[UPDATE_FORM.PHP]
<?php
// RETRIEVE VALUES FOR THE UPDATE FORM
$sqlvalues="SELECT * FROM contacts
WHERE id='$id'";
$result=mysql_query($sqlvalues);
// DISPLAY FORM (showing truncated values)
while($row = mysql_fetch_array($result)):
$id = $row["id"];
$fname = $row["fname"];
$lname = $row["lname"];
print("<form method='post'
action='updatedrecords.php'><br>" .
"Name<input type=text name=fname value=$fname><br>" .
"Surname<input type=text name=lname value=$lname><br>" .
"etc");
endwhile;
echo("</form>");
?>