Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making 2 URL calls from one PERL script

Status
Not open for further replies.

jazzachy

Programmer
Joined
Aug 7, 2006
Messages
3
Location
US
I know how to forward one CGI call to another. What I am wondering is if anyone has ever made 2 calls from a PERL or PHP script?

Thanks,
Dan
 
You send data to one script, that one script has to handle whatever else you need to do. That can include sending the data along to another script.
 
I have a shopping cart application.

I want to add 2 products to the cart while only pressing one link...the link would be a PERL or PHP program that would then call the 2 URL's that would store the products on the user's cookies.

Does anyone know how to do this in PERL or PHP?
 
Not sure how your addProduct Page is setup, I'm assuming, the user goes to the desired products Page, which has multiple items listed on it --> adds two items and then clicks add to cart button? If so, in theory:

form action="addToCart.cgi"
prodKey1Quantity = 2;
prodKey2Quantity = 2;
submit (addToCart);

addToCart.cgi should run the commands to add to the DB and display the results/modification page.

HTH

 
how you do it depends on your existing script and how its written and how the data is stored. There is no one-size-fits-all answer to your question.
 
I need to post a coupon on a product (all in one step)

Here is the problem.

The shopping cart has an interface that makes you call 2 different URL's.

So

&

I need to do both actions, so My QUESTION.

Does anyone know of a way to call 2 URL's in a PERL or PHP script. If not I will have to use a couple of work around options, like using javascript to open a window and add the URL.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top