Re: PHP & Variables
| From: | John W. Holmes | Date: | Sat, 06 Dec 2003 22:57:12 +0000 |
| Subject: | Re: PHP & Variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-172103@lists.php.net to get a copy of this message | ||
Lloyd Bayley wrote:
Please learn HTML. The "value" should have quotes around it. echo "<input type=\"text\" name=\"question1_text\" value=\"$question\"><br />"; or, even MORE correct: echo '<input type="text" name="question1_text" value="' . htmlentities($question) . '"><br />'; -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.comecho "<input type=text name=question1_text value=$question><br>"; <------------ This returns first word.