You are here: Passing arguments to a script « PHP Programming Language « IT news, forums, messages
Passing arguments to a script

Posted by Hemanth on 10/07/05 04:53

Hello,

A novice question....

I've a script that uses GET method and is called with two parameters
(example.php?arg1=val1&arg2=val2). This script outputs a html form with
two list boxes and a display button next to them.

Everytime I execute this form (i.e., select from listboxes and click on
the display button), I want call the same "example.php" script with the
selected listbox values (say, option1, option2) as well as the previous
arguments (va11, val2) - total 4 arguments.

I tried the following (hoping it would work;)
<form name="ex" method="GET" action="example.php?arg1=val1&arg2=val2"
target="_parent">
<select>....</select> //option1
<select>....</select> //option2
<input type="submit" value="Display"/>
</form>

But when I click on the display, it calls example.php with only 2
values (option1, option2). My question is, is there a way to
- pass the first two arguments - val1,val2 (along with listbox values)

OR
- store the val1, val2 as static variables so that they are available
everytime the script is called (without having to pass them as
arguments).




Appreciate your help.

TIA
Hemanth

 

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

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