PHP email and passing values to another website

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
apg1985
Forum Newbie
Posts: 4
Joined: Mon Aug 11, 2008 11:14 am

PHP email and passing values to another website

Post by apg1985 »

Hi Guys

Ive got a form with a button at the bottom, the action of the form goes through to a php script that passes the values in the form to an email. I need to pass one of the values in the form to Netbanx, they say the action should be a unique URL to their site and a unique variable name so a field in their site can call it across.

If I put the URL in the action its not going to go to the php script, is there any way after the php script has sent the email of re-directing to the unique Netbanx URL and passing the value in the same php email script?

If you need any code, please post.

Thanks in advance
watson516
Forum Contributor
Posts: 198
Joined: Mon Mar 20, 2006 9:19 pm
Location: Hamilton, Ontario

Re: PHP email and passing values to another website

Post by watson516 »

As long as you don't send any headers in the form's action script, then you can use

Code: Select all

<?php
//Code for sending the email
header('Location: domain.com/page.php?var=val');
?>
That will redirect the browser to the other website with the GET variables.
User avatar
Skoalbasher
Forum Contributor
Posts: 147
Joined: Thu Feb 07, 2008 8:09 pm

Re: PHP email and passing values to another website

Post by Skoalbasher »

watson516 wrote:As long as you don't send any headers in the form's action script, then you can use

Code: Select all

<?php
//Code for sending the email
header('Location: domain.com/page.php?var=val');
?>
That will redirect the browser to the other website with the GET variables.
Well you can, you just have to use ob_start and flush right? That's how I do it.
Post Reply