jrswastaken Posted September 8, 2006 Share Posted September 8, 2006 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 javascriptThanks in advance - James Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 8, 2006 Share Posted September 8, 2006 please exsplain more as the way i read it the quistion says it all works and i need more bandwith Quote Link to comment Share on other sites More sharing options...
jrswastaken Posted September 8, 2006 Author Share Posted September 8, 2006 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 Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 8, 2006 Share Posted September 8, 2006 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. Quote Link to comment Share on other sites More sharing options...
Jenk Posted September 8, 2006 Share Posted September 8, 2006 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. Quote Link to comment Share on other sites More sharing options...
jrswastaken Posted September 10, 2006 Author Share Posted September 10, 2006 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 Quote Link to comment Share on other sites More sharing options...
jefkin Posted September 10, 2006 Share Posted September 10, 2006 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] Quote Link to comment Share on other sites More sharing options...
jrswastaken Posted September 10, 2006 Author Share Posted September 10, 2006 Thanks a heap - this seems to be exactly what I'm looking for - and its even installed on my serverCheers - James Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.