Re: Truncated values in update form
| From: | Alex Ciurea | Date: | Tue, 20 May 2003 15:00:15 +0000 |
| Subject: | Re: Truncated values in update form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148287@lists.php.net to get a copy of this message | ||
hello Alberto,
try to use some quotes at the 'value' attribute:
instead of this:
> "Name<input type=text name=fname value=$fname><br>" .
> "Surname<input type=text name=lname value=$lname><br>" .
try this:
> "Name<input type=text name=fname value="$fname"><br>" .
> "Surname<input type=text name=lname value="$lname"><br>" .
Have a better day!!!
----- Original Message -----
From: "Alberto Brea" <estudiobrea@fibertel.com.ar>
To: <php-general@lists.php.net>
Sent: Tuesday, May 20, 2003 5:59 PM
Subject: [PHP] Truncated values in update form
> 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>");
> ?>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>