RE: [PHP] hidden
| From: | Mark Roedel | Date: | Wed, 10 Oct 2001 17:02:38 +0000 |
| Subject: | RE: [PHP] hidden | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-70699@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Jeremy Morano [mailto:jeremy@prepresshelp.com]
> Sent: Wednesday, October 10, 2001 11:08 AM
> To: php-general@lists.php.net
> Subject: [PHP] hidden
>
>
> Hi everyone,
>
> I am trying to pass a variable called $username to the next
> page. I do not want to use a session so I am using an Input
> type "hidden", but its not working. Can anyone tell me why
> and how to make it work?
>
> Thank you.
>
>
> <?
>
> [snip]
>
> $display_block = "
> <FORM METHOD=\"post\" ACTION=\"show_add_a_pick2.php\">
>
> <P><strong>User:</strong>
> <select name=\"accounts\">
> $option_block
> </select>
>
> <INPUT TYPE=\"SUBMIT\" NAME=\"submit\" VALUE=\"Select this
> User\"></P>
>
> <INPUT TYPE="hidden" name="username" value="<? echo
> "$username"; ?>">
>
> </form>
> ";
>
> ?>
Have you tried viewing the contents of $display_block to make sure
they're what you were expecting? Unless I'm missing something, you
appear to be trying to open a PHP code block *inside* a PHP code block.
Between that and the unescaped quotes, I'm surprised you're getting
anything other than a parse error out of this snippet.
---
Mark Roedel | "The most overlooked advantage to owning a
Systems Programmer | computer is that if they foul up there's no
LeTourneau University | law against whacking them around a little."
Longview, Texas, USA | -- Owen Porterfield