Hello
I would like to ask your advice about a certain matter. I have a form which collects details from the customer. At the moment it is designed to directly connect to the worldpay server.
But what I want to do is alter it to that it re-directs to my own PHP processer file. My file should then do several tasks with the data they posted:
1. Examine the check option field and register the user on a mailshot
2. Email the anticipated order details to the shop (even though the task is incomplete)
3. Send the details to worldpay.
So my question relates to item 3. Can I have a hidden form on a PHP page that the user can't see that automatically submits when the page is processed?
Or is there any other way that I can do this?
Thanks in advance.
Andrew
Forms and more forms :)
Moderator: General Moderators
-
mattpointblank
- Forum Contributor
- Posts: 304
- Joined: Tue Dec 23, 2008 6:29 am
Re: Forms and more forms :)
Send the form to your own php page which processes the relevant data, then maybe use AJAX to $_POST the data to the Worldpay script automatically?
Re: Forms and more forms :)
Thanks for your reply. I can certainly do the first bit as I have already created contact pages and use my own PHP processor to re-direct the user based on the results etc.. But as for AJAX, this is something I have never used.
I am certainly not a PHP guru but I have a good knowledge of C++ and and feel at home with PHP thus far.
Andrew
I am certainly not a PHP guru but I have a good knowledge of C++ and and feel at home with PHP thus far.
Andrew
-
mattpointblank
- Forum Contributor
- Posts: 304
- Joined: Tue Dec 23, 2008 6:29 am
Re: Forms and more forms :)
Have a read through this: http://www.tizag.com/ajaxTutorial/
Re: Forms and more forms :)
Thanks. It turns out that worldpay also support a URL command line with the various values. So I am looking into that first.
Andrew
Andrew
-
mattpointblank
- Forum Contributor
- Posts: 304
- Joined: Tue Dec 23, 2008 6:29 am
Re: Forms and more forms :)
Cool - that makes using AJAX easier - you can send a $_GET request pretty easily to a specific URL, which that tutorial should explain.