Re: Passing through Array's to another script

From: Date: Tue, 18 Dec 2001 14:31:42 +0000
Subject: Re: Passing through Array's to another script
Groups: php.general 
Request: Send a blank email to php-general+get-78065@lists.php.net to get a copy of this message
If you need to POST a form, but include some variables, you can use hidden fields. <form action="script.php" method="post"> <input type="hidden" name="a" value="foo"> <input type="hidden" name="b" value="bar"> <input name="c"> </form> Assuming someone now enters "baz" into the <input> called c, your POST data is equivalent to doing <a href="script.php?a=foo&b=bar&c=baz">Click here!</a> However, you can't do this: <form action="script.php?a=foo&b=bar" method="post"> <input name="c"> </form> Because a & b won't get submitted. Cheers Jon -----Original Message----- From: Julio Nobrega Trabalhando [mailto:inerte@hotmail.com] Sent: 18 December 2001 14:32 To: php-general@lists.php.net Subject: Re: Re: [PHP] Passing through Array's to another script Well, there's a small difference between form's GET/POST and passing variables using the ? on urls. I don't know the techinal details of it, but it's possible. I guess, on this particular case, the form method is POST. When the next page is loaded (the action target), you put some GET parameters too. It's not about the form, but the page that is being loaded. Maybe it can receive GET and POST at the same time?... I guess that's the case.

« previous php.general (#78065) next »