Forum Moderators: coopster
you could use the header [ca.php.net] function to redirect, remember to output nothing, not even a blank line, to the browser before the function call or it will give you an error about 'output already started at line x'.
Build your query string
send your email
call header and send them off to pay
If you use sessions for non-vital data, remember to include the SID (Session ID) in href's, form action, etc.
eg:
<form action="?<?=SID?>" method="post" name="foo">
<a href="page2.php?<?=SID?>" title="yoyo in the bar">bar</a>
Why do you need this?
Well, if the client does not support session cookies, it's needed to keep the session alive!
If needed, I can provide an example code for sessions for you!
Is there any other methogs available in PHP for redirection which also full fill my other needs...plzzzzz help
>..............................<
<?
$to = $to;
$from = $from;
$email = $email;
$subject = $subject;
$message = $message;
$eventname = $eventname;
$startdate = $startdate;
$starttime = $starttime;
$enddate = $enddate;
$description = $description;
$email = $email;
$msg = "Message\n";
$msg .= " $message\n";
if ($eventname!= "") {
$msg .= "Event Name: ".$eventname."\n";
}
if ($startdate!= "") {
$msg .= "Start date: ".$startdate."\n";
}
if ($starttime!= "") {
$msg .= "Start Time :".$starttime."\n";
}
if ($enddate!= "") {
$msg .= "End Date: ".$enddate."\n";
}
if ($description!= "") {
$msg .= "Description: ".$description."\n";
}
if ($email!= "") {
$msg .= "Email: ".$email."\n";
}
$mailheaders = "From: Web Design tools ( $from )<> \n";
$mailheaders .= "Reply-To: $email\n\n";
mail($to, $subject, $msg, $mailheaders);
>.............................................<
header("Location: [example.com...]
somepage.php is the page you want to redirect to (where u may have ur CR processing or whatever)
now to allow for the total of all the packages or whatever to be carried forward you could use do the following
header("Location: [example.com...]
you can then get total=12345 in the somepage.php by using
$total = $_GET['total'];
and there u have a value to play with. just remember that using this method the toatl value passed to the new page is visible to the 'public', not very secure, but it depends on what data you wanna send, so...
go to [no.php.net...]
and look for HTTP GET variables: $_GET
hope it helps