/    Sign up×
Community /Pin to ProfileBookmark

Form Submit (2 Actions?)

Hey guys,

Just working on this little site: [url]http://www.noveltymug.co.uk/personalised/[/url]

Basically, user will enter, Name, Email, Phone number and then a message. Select a file to upload which then redirects to: [url]http://www.noveltymug.co.uk/thankyou.php[/url] where they would click buy now and pay via paypal. How do I get it to do it all in one which would submit all the details to me and then straight to paypal?

The form details are: <form id=form name=form action=http://www.noveltymug.co.uk/personalised/personalised.php method=post onsubmit=”return validate_form ( );” enctype=”multipart/form-data”> on the first page and the paypal code is:

<form action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>
<input type=”hidden” name=”cmd” value=”_s-xclick”>
<input type=”hidden” name=”hosted_button_id” value=”9698071″>
<input type=”image” src=”https://www.paypal.com/en_GB/i/btn/btn_buynow_LG.gif” border=”0″ name=”submit” alt=”PayPal – The safer, easier way to pay online.”>
<img alt=”” border=”0″ src=”https://www.paypal.com/en_GB/i/scr/pixel.gif” width=”1″ height=”1″>
</form>

Thanks guys,

Dean

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@MindzaiNov 14.2009 — The easiest way is probably to perform a redirect using the header() function once the data has been processed. This also gives you the option of re-displaying the form in case validation fails.
Copy linkTweet thisAlerts:
@DeCalauthorNov 14.2009 — Any chance of an example of that? I'm pretty new to php / form stuff.

Cheers

Dean
×

Success!

Help @DeCal spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...