Jump to content

tidysi

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tidysi's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I started a new topic since the last one was actually solved, but created a new challenge for me: Essentially: test.php -------- $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://ukvpstest.protx.com/VSPSimulator/VSPFormGateway.asp"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "VPSProtocol=2.22"); curl_exec ($ch); curl_close ($ch); exit; Now this works, the script at protx picks up on the VPSProtocol so I know I'm almost there However, the browser still seems to be on the test.php page rather than protx's page I know curl retrieves data from sites and then processes but all I need to do is to use curl to post the variables to that script,and then leave the script at protx to take care of the rest Any ideas ?
  2. Thanks everyone for the help I've been scouring the internet about curl since that seems to be what I want: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"example_transactionURL"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "VPSProtocol=2.22"); curl_exec ($ch); curl_close ($ch); exit; This fixes the problem however introduces a new one that I hope you can help with When I run this, rather than going to the 'example_transactionURL', the script seems to send the data to it and stay on the same page that i called the script for - yet I can still see some output from the target URL. What I really want is for the the browser to be at the new URL rather than the old one. Is this making sense- I think I'm almost there - is it another curl_setopt for this ? Thankyou!
  3. Sorry No that doesn't work - Does using the header('Location') function send the variables you add to it as a POST or GET ? The ecommerce transcation system that i am pointing to wants them in the POST format - when i try it, it all looks fine in the address bar but the transaction script doesn't pick it up? Any Ideas? I'm pretty sure that this is the sticking point
  4. My ecommerce system requires that certain variables be passed to it in POST form - normally i would submit directly from a form and it would be fine; my problem is that I need to do some validation first on this form and then insert the variables into the header("Location: URL ") from variables in the php script So essentially: confirmationPage.php -------------------- <form id = "frmConfirmation" name = "confirmOrder" action="confirmationPage.php" method="POST" onSubmit="return validate_frmConfirmation(this);"> // form elements <input type="hidden" name = "ticketDate"/> <input type="hidden" name = "numDayAdults"/> <input type="hidden" name = "numDayChildren"/> </form> The javascript validation works fine. When the form is submitted I need to check the ticketDate variable in PHP before submitting it to the ecommerce site; how do i put these variables into the header('Location: ') function? Any suggestions would be absolutely brilliant because this has been bugging me for a while now! Thankyou!
  5. My PHP script inserts data into a mysql table that has been passed into it. My question is, what is the general method by which to ensure that if a user reloads the screen, the same set of data doesn't get duplicated into the database? For instance, I am inserting ticket data (its an ecommerce event system) into a mysql and really dont want duplicated entries if the user happens to press reload or back or whatever Any ideas?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.