Re: [PHP4BETA] re:Passing an inputs value without a form

From: Date: Thu, 17 Feb 2000 00:54:40 +0000
Subject: Re: [PHP4BETA] re:Passing an inputs value without a form
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-10380@lists.php.net to get a copy of this message
On 17 Feb, Joseph H Blythe wrote: > Hey all, > > I was wondering if anyone knew a way ( if it is even possible ) to pass > an inputs value like the type 'text' with php via a link? > > example: > > $arg1="foo"; > $arg2="bar"; > $MyValue="toe"; > echo "<input type='text' name='MyName' > value='$MyValue'>"; > echo "<a href="parseValues.phtml?Arg1=$arg1&Arg2=$arg2>"; > > now consider I also want to pass 'MyValue' along with Arg1 and Arg2 but > I am not using the form submit method=POST is there any way to > theoretically do this? > > Any help always appreciated. > > Joseph Blythe Use urlencode to encode the value; it would be good technique to do this with all the values being passed, to protect against at least spaces in the variables. $MyValue = urlencode($MyValue); echo "<a href=\"parseValues.phtml?Arg1=$arg1&Arg2=$arg2&MyValue=$MyValue\">"; You don't seem to be doing anything with MyName? Cheers -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.version4 (#10380) next »