You are here: Re: Simple Problem? ... Please Advise ... « All PHP « IT news, forums, messages
Re: Simple Problem? ... Please Advise ...

Posted by J.O. Aho on 12/18/05 10:47

number1.email@gmail.com wrote:
> Hi Aho,
>
> Not sure if I understand this...maybe you can explain it to me. When I
> put this code into index2.php, it displays a "textbox" when this file
> is called from index.php.
>
> What I'd like to do is have only index.php prompt for the username, and
> pass this to index2.php. When I click on the Submit Button on
> index2.php, I'd like to pass this username back to index.php (ie: via
> the ?username option as you mentioned previously).
>
> Is there a way to buildup this HTML Tag:
>
> <FORM action="index.php?username=123" method="post"><BR>
>
> via code...perhaps via sprintf, so that a %s is used to pass in the
> exact value of the username variable when control is passed back to
> index.php?
>
> Perhaps I'm missing something. Thanks for all your help with this.

<form action="index.php" method="post">
<input type="hidden" name="username" value="<?PHP echo $username; ?>">
<input type="submit" value="Back to index1">
</form>

This requires that you already have transferred the username from $_REQUEST to
$username.

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация