Re: Double quotes and HTML
| From: | trystano at aol dot com | Date: | Thu, 17 Nov 2005 10:52:52 +0000 |
| Subject: | Re: Double quotes and HTML | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-26503@lists.php.net to get a copy of this message | ||
Try the following...
<?php
if (isset($_POST["user_id"]))
echo "<br><input type='text' name='user_id'
size='40' maxlength='15'
value='".$_POST["user_id"]."'>";
else
echo "<br><input type='text' name='user_id'
size='40' maxlength='15'>";
?>
... you just need to come out of the string and back into PHP code. You can do it within the string
but I prefer to separate my PHP from strings so that I know where the logic is.
Tryst