Re: Repopulating forms
| From: | Anthony | Date: | Tue, 05 Aug 2003 13:58:43 +0000 |
| Subject: | Re: Repopulating forms | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-158289@lists.php.net to get a copy of this message | ||
becasue your $test string contains double quotes. This is casuing you to
end the value element in the input tag.
- Anthony
"Gerard L Petersen" <gerard@gamelink.co.za> wrote in message
news:040201c35b59$3ebce690$050aa8c0@guided1...
> Hi
>
> My code looks like this.
>
> <?PHP
> $test = "gerard's name is \"gerard\"";
> echo $test."<br>";
> echo '<input type="text" name="test2"
> value="'.$test.'"><br>';
> ?>
>
> <form action="test2.php" method="post">
> <input type="text" name="foo" value="" />
> <input type="submit" name="sub" value="submit">
>
> </form>
>
>
> When i run it the bit after the quotes are truncated. Where it truncates
> depends on what type of quote i am using.
>
> Any ideas?
>
> Thanks
>
> Gerard
>
>