Passing a PHP variable to ASP form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Stussy
Forum Newbie
Posts: 1
Joined: Wed Dec 03, 2003 5:33 pm

Passing a PHP variable to ASP form

Post 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
User avatar
uberpolak
Forum Contributor
Posts: 261
Joined: Thu Jan 02, 2003 10:37 am
Location: Next to the bar

Post 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.
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post 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"
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post 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
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

sure start with get

Post 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
Post Reply