On Sun, Jul 13, 2008 at 12:20 PM, Adrian Suri <[EMAIL PROTECTED]> wrote: > Hi I have php 5 installed but when I run this script I do not seem to > be getting the arguments being past to the script calling the script > thus, any ideas > local address http://os2.no-ip.info/irusdev.info/test.php? Action=Tom > Town=Haworth > <? > if(argc>1) { > echo "have arguments "; > foreach($argv as $arg) { > list($argname, $argval) = split("=",$arg); > $$argname= $argval; > } > echo "no arguments found"; > } > print "Action is " . "\n"; > print "Tom is " . $town . "\n"; > ?>
Hi Adrian, The $argv array is used when you call scripts from the command line. When you are running a script through a web server you can use $_GET to access query string arguments ?name1=value1&name2=value2 Regards, Phill