Reply to URL

Your name:

Reply:


Posted by Shelly on 04/26/06 22:47

This is probably very simple, but I can't seem to figure it out.

If we have straight html and a form with method="GET",
action="http:/www.foo.com", and hidden variables of var1 and var2 with
values, the submit button results in a URL of

http:/www.foo.com?var1=something&var2=somethingelse.

What I want to do is have this be a php page and have a conditional
statement in there that sets the value of var2. That is also no problem,
except I want this condition to be based upon whether text field txt1 is
empty or has information put in there by the user. I cannot figure out how
to reference the text fiels txt1 in order to formulate the test.

I have tried $txt1, $_POST['txt1'] and $_GET['txt1']. What I want to
generate is a URL of either

http:/www.foo.com?var1=something&var2=somethingelse
or
http:/www.foo.com?var1=something&var2=somethingelseagain

depending upon whether or not txt1 is empty and I want to do this within the
<body></body> section.

Thanks.

Shelly

[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

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