adwilk
adwilk

Reputation: 55

Submitting to a remote .cfm file using an html form

I want visitors to my website to be able to search for airport lounges offered by a company called Priority Pass. I have created the following form:

<form action="http://prioritypass.com/lounges/lounge-print.cfm" method="post">
  <input type="text" id="print_airport_code" name="print_airport_code" value="MAN" />
  <input type="submit" value="Submit" />
</form>

Which mirrors the form they have on their own mobile search site (here). But when I submit my form it doesnt seem like the parameters are being posted properly.

Any help would be great. Thanks.

The form on their website doesnt appear to contain any fields which I have missed?

Upvotes: 0

Views: 1054

Answers (1)

Shawn Holmes
Shawn Holmes

Reputation: 3762

You're pointing to the wrong URL; POSTing to /lounges/lounge-print.cfm is producing an HTTP redirect header, which is corrupting your output.

Additionally, the name of your input field is incorrect. Using someone else's form results often requires you to maintain all field names consistently as they appear on the remote site.

Change the form to:

<form action="http://www.prioritypass.com/mobile/lounges.cfm" method="post">      
    <input id="Airport_Code" name="Airport_Code" type="text" size="10" value="MAN" />
    <input type="submit" value="Submit" />
</form>

Upvotes: 4

Related Questions