954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

two actions in a form

hey all

I have a standard php form and I want a to add paypal purchasing action to it as well.

is there an easy way to do this?

thanks in advance

super_noobie
Newbie Poster
3 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

hey all

I have a standard php form and I want a to add paypal purchasing action to it as well.

is there an easy way to do this?

thanks in advance


post your code first. if is it has any modification , let me see your code.

rajabhaskar525
Junior Poster
179 posts since Nov 2009
Reputation Points: 12
Solved Threads: 27
 

yes post code please.

without seeing the code i think you have two options:

If you have access to the first action page (before paypal) then add this at the very end of the script (before any actual text output):

<?php
header('location: http://www.secondFormAction.com');
exit;
?>


which will forward the user to the next form action. if you do not have access to the first action then consider using ajax to submit the second action?

MaxMumford
Posting Whiz in Training
228 posts since Oct 2006
Reputation Points: 32
Solved Threads: 3
 

thanks for the responses

I did try the code that was presented by MaxMumford and it worked like a charm

it was exact way I was thinking of going but didn't know how to get there

thanks again

super_noobie
Newbie Poster
3 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

hey guys,

i am trying to accomplish this too but cant get the little sucker to work...

i had a php contact form which iadded fields to so now it's become a order form. well originally it sends me an email with the order, but now i need the paypal to process to. at the minute i can either do one or the other.

i tried adding the paypal url ( https://www.paypal.com/cgi-bin/webscr ) to the header redirect but it didnt work.

i only know html and css, so i'm kind of stuck :-\

thanks for the help

Shelton

sheltonjb
Newbie Poster
1 post since Sep 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: