Reputation: 4408
I'm trying to implement paypal into my website. So what i have is a form and after submiting that form i would like to redirect user to paypal page, like this:
if($validator->check()){
//do some things like adding data to database, etc
//redirect user to paypal here
}
how can i do this?
EDIT: i can't just use header, i also need to send my encrypted data to paypal, here is the form that i would use if i would be using paypal provided button: http://pastebin.com/w65LkmBE
Upvotes: 0
Views: 861
Reputation: 2275
It is not possible. You should use JS (AJAX) for this. If the form method would be GET and not POST, than that would be real.
Upvotes: 2
Reputation: 1646
if you did not echoed anything :
header("Location: http://paypal.com/...")
Upvotes: 1