Jump to content

Archived

This topic is now archived and is closed to further replies.

jrswastaken

how can I submit a form multiple times, need to submit a form without redirectin

Recommended Posts

Hi All,

I have a shoppping basket like item/page and I need to submit it to a processing script to which I have no access one item at a time.

How can I submit a form without it redirecting - prefferably with a wait of half a second between each item?

I'm able to use php and javascript

Thanks in advance - James

Share this post


Link to post
Share on other sites
please exsplain more as the way i read it the quistion says it all works and i need more bandwith

Share this post


Link to post
Share on other sites
Hi,

I'm interfacing with a billing site that allows multiple items to be submitted and combined into one transaction.  They only allow one item to be added at a time so currently you have to hit back on the browser select a new item, submit it, hit back, choose a new item, submit it and then if you are done you can click through to the payment page.   

I've built a shopping basket like page that allows multiple items to be selected but I need to submit it to the same processing script - I need to be able to loop through the selected items and submit them one at a time - how can I do a post data (kind of like ajax) without the payment screen being returned such that I can continue through my loop submitting more items.

Cheers - James

Share this post


Link to post
Share on other sites
when a user submit items to the basket  a page like update.php then you redirect the user back to the page and the basket should be filling up as the user submits more.

when the user finished then they checkout then hopefully pay.

this is how i would do it .

on the main page show a basket of contents of buying items  number of items and total price.

each time a user adds a item the form posts to a update.php page and redirects the user to the main page agin to enable the user to add more items.


when the user ready to pay then the user press check out button that adds all items up and pay via paypal.

Share this post


Link to post
Share on other sites
If the billing site is that bad, which I strongly believe it not to be and you are mistaken, then find a new billing site. all billing needs to know is cost and payment method, so tally up your users cost and then submit that to the billing site.

Share this post


Link to post
Share on other sites
I have to use this billing system - its part of a project for a company and the billing system interfaces with their ledger - this is why I need to send individual items through and not a total as each item will be entered into the ledger.

I don't have access to the checkout page so I can't have it redirect back to my shopping basket - so I need to be able to submit some form data to this checkout page without the checkout page displaying the current total and asking me if I want to pay now.

The only way I can think of doing it is via opening a popup window with the form, having it autosubmit and then close - but this breaks if popups are disabled - the only other way I can think of is by using AJAX but I'd prefer to do it in the PHP instead of with javascript

Share this post


Link to post
Share on other sites
hi jrswastaken,

Sounds like something libcurl could help you with. 

[url=http://us3.php.net/manual/en/ref.curl.php]http://us3.php.net/manual/en/ref.curl.php[/url]

[url=http://us3.php.net/manual/en/function.curl-init.php]http://us3.php.net/manual/en/function.curl-init.php[/url]

[url=http://us3.php.net/manual/en/function.curl-exec.php]http://us3.php.net/manual/en/function.curl-exec.php[/url]

[url=http://us3.php.net/manual/en/function.curl-close.php]http://us3.php.net/manual/en/function.curl-close.php[/url]


Share this post


Link to post
Share on other sites

×

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.