Reply to Re: passing variables via a form

Your name:

Reply:


Posted by Stefan Rybacki on 09/06/05 01:33

google.20.jbloggs@xoxy.net wrote:
> Weird problem - why is it that this works:
>
> <a href="page.php?variable=1">click</a>
>
> but this doesn't:
>
> <form method="post" action="page.php?variable=1">
> <input type="submit" name="submit" value="submit">
> </form>
>
> With the "form" method, I still get the "page.php?variable=1" URL, but
> the page opens as if no variables are passed.

I guess you're using something like this:

$_GET['variable']

and since you do a post the value is now in

$_POST['variable']

So better use $_REQUEST['variable'] everytime you pass variables. $_REQUEST contains both
variables passed by get and post.

Stefan


>
> It also doesn't work if I use a hidden form field to pass a variable.
>
> Joe
>

[Back to original 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

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