RE: [PHP] method=post problem
| From: | John Holmes | Date: | Thu, 16 May 2002 01:36:56 +0000 |
| Subject: | RE: [PHP] method=post problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-97855@lists.php.net to get a copy of this message | ||
Use quotes and a little common sense.
<input type=hidden name=quiz value=John Doe>
How do you expect HTML to know that you mean John Doe to be the entire
value? Computers only do what you tell them.
<input value=John Doe crap=foo name=quiz>
So what's the value there? Is it 'John', 'John Doe', 'John Doe
crap=foo'
or what??
Hope you see the point...
<input type="hidden" name="quiz" value="John Doe">
---John Holmes...
> -----Original Message-----
> From: Jule [mailto:jslootbeek@clarku.edu]
> Sent: Wednesday, May 15, 2002 9:28 PM
> To: php-general@lists.php.net
> Subject: [PHP] method=post problem
>
> Hey guys and gals,
>
> i have a form with method=post which sends
>
> <input type=hidden name=quiz[quiz_title] value=$quiz[quiz_title]>
> <input type=hidden name=quiz[owner_name] value=$quiz[owner_name]>
> <input type=hidden name=quiz[owner_email] value=$quiz[owner_email]>
> <input type=hidden name=quiz[number_answers]
value=$quiz[number_answers]>
> <input type=hidden name=submitted value=TRUE>
>
> to the same page, and picks it up in an
> if ($submitted) {....} loop.
>
> but now here's the problem:
> when it comes back and goes into the loop. Only the first name from
> $quiz[owner_name] is left, so where it used to be John Doe, is now
only
> Joe.
> how do i fix this?
>
> thanks
>
> Jule
> --
> |\/\__________________________/\/|
> | Jule Slootbeek |
> | jslootbeek@clarku.edu |
> | http://blindtheory.cjb.net |
> | __________________________ |
> |/\/ \/\|
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php