Page 1 of 1
Passing a PHP variable to ASP form
Posted: Wed Dec 03, 2003 5:33 pm
by Stussy
I was wondering if there was a way of passing a PHP variable from a HTML form such as $FirstName to populate another form on an ASP page?
Thanks
Posted: Wed Dec 03, 2003 8:24 pm
by uberpolak
I'm not too familiar with ASP, but it probably has a way to access the POST headers, so if you make the form's method "post," then use your ASP knowledge to access post variables, you shouldn't have any problems.
Posted: Wed Dec 03, 2003 10:34 pm
by JAM
Firts thought; $_GET, sending the variables in the URI.
As in
http://www.example.com/folder/index.php ... uppet=gngh would equal $_GET['foo'] = 'bar' & $_GET['muppet'] = 'gngh' in PHP.
Achieved by using <form method="get"> as opposed to method="post"
Posted: Wed Dec 03, 2003 11:08 pm
by Nay
Yeah, the GET would be good, but becareful with passwords and etc. For ASP you use Request.QueryString("foo") if you didn't already know that.
-Nay
sure start with get
Posted: Thu Dec 04, 2003 12:31 am
by pelegk2
beacuse it bilds the url+variavles execlly like in asp
(i know i working with asp for 2 years)
about post check it out
after u post to an asp page
u have there request.servervariables("**")...(***something dont remember at the moment check the and u find there the full query string that was sent using post) and u will see if there is no problem and diffrence (i belive not beacuse it build the string the same u just dont see the variables in the adress bar
good luck
and come visit the holy land = ISRAEL