RE: [PHP-DB] Re: displaying info in a form
| From: | Jonathan Hilgeman | Date: | Fri, 29 Mar 2002 16:58:27 +0000 |
| Subject: | RE: [PHP-DB] Re: displaying info in a form | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-18038@lists.php.net to get a copy of this message | ||
People have already answered this question, but here are some additional
tips.
Always make sure you include the NAME attribute of an INPUT - otherwise it
can cause some headaches when you try to get the submitted data on the next
page. So:
<input type="text" name="TrackingNum" value="<?php echo
$tracking_num ?>">
You can also shorten the echo/print statement down to:
<input type="text" name="TrackingNum"
value="<?=$tracking_num;?>">
I've heard that you can leave off the semi-colon, but I just consider it
good coding habit to always end statements with semi-colons.
- Jonathan
-----Original Message-----
From: Luis R. Sales Glez. [mailto:lrsg@intradev.sola.sony.com]
Sent: Friday, March 29, 2002 9:30 AM
To: Natividad Castro
Cc: php-db@lists.php.net
Subject: [PHP-DB] Re: displaying info in a form
Hi Natividad & *:
Try to declare the input file as:
<input type=text value="<?php echo $name ?>">
instead of
<input type=text value=<?php echo $name ?>>
Regards,
--
Luis R. Sales Glez.
Database Administrator
Information Systems & Solutions
Sony Latin America Inc.
Mailto: lrsg@intradev.sola.sony.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php