RE: [PHP] session variable name into form
| From: | scott [gts] | Date: | Mon, 09 Jul 2001 15:22:15 +0000 |
| Subject: | RE: [PHP] session variable name into form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-56949@lists.php.net to get a copy of this message | ||
this also works:
<INPUT TYPE=HIDDEN NAME="writer" VALUE="<?= $auth_user ?>">
but the way you have it currently written is perfectly OK.
it seems as if the problem is with your variable not being
set, rather than with your PHP code.
try explicitly setting the variable a few lines above
the output of the INPUT field
<? $auth_user = "TESTING"; ?>
blah blah blah
<INPUT TYPE=HIDDEN NAME="writer" VALUE="<?= $auth_user ?>">
PS: is the output happening in a function?
be sure to have the variable "global"-ized somewhere
in the function, or else you'll never see any value
for $auth_user;
> -----Original Message-----
> From: PHP [mailto:phpmailinglist@yahoo.com]
> Sent: Monday, July 09, 2001 10:32 AM
> To: Andrew Austin; Php Lists (E-mail)
> Subject: Re: [PHP] session variable name into form
>
>
> This works for me...
> echo ' <INPUT TYPE=HIDDEN NAME="writer" VALUE=" ' . $auth_user .
> ' "> ';
>
> ----- Original Message -----
> From: "Andrew Austin" <plant-tech@xtra.co.nz>
> To: "Php Lists (E-mail)" <php-general@lists.php.net>
> Sent: Monday, July 09, 2001 12:25 AM
> Subject: [PHP] session variable name into form
>
>
> I have a session variable called auth_user and want to put the variable into
> a form field. I have tried the following and similar but am not succeeding.
>
> <INPUT TYPE=HIDDEN NAME="writer" VALUE="<?php echo
> $auth_user;?>">
>
> how else might it be done
>
> aa
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>