Jump to content


Photo

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


  • Please log in to reply
7 replies to this topic

#1 jrswastaken

jrswastaken
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 08 September 2006 - 07:26 AM

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

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 08 September 2006 - 08:00 AM

please exsplain more as the way i read it the quistion says it all works and i need more bandwith
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 jrswastaken

jrswastaken
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 08 September 2006 - 08:45 AM

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

#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 08 September 2006 - 08:49 AM

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.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#5 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 08 September 2006 - 09:05 AM

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.

#6 jrswastaken

jrswastaken
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 10 September 2006 - 03:05 AM

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



#7 jefkin

jefkin
  • Members
  • PipPipPip
  • Advanced Member
  • 55 posts

Posted 10 September 2006 - 03:29 AM

hi jrswastaken,

Sounds like something libcurl could help you with. 

http://us3.php.net/m...en/ref.curl.php

http://us3.php.net/m...n.curl-init.php

http://us3.php.net/m...n.curl-exec.php

http://us3.php.net/m....curl-close.php




#8 jrswastaken

jrswastaken
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 10 September 2006 - 03:58 AM


Thanks a heap - this seems to be exactly what I'm looking for - and its even installed on my server

Cheers - James




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users