I am trying to create multiple actions for one form called picup.php.
This form just processes data and takes it and inserts it into the registration database and after this has been accomplished i WOULD LIKE TO EMAIL THE USER OF there successful registrationa and if it is a paid event redirect them to a paypal page.
Can anyone help me? Also if you must know i am trying to fix and customize the horrible programing of Infocentral www.infocentral.org for your own info do not ever use this it was create with very little logic. Only reason why i am touching is for a client.
I have posted the process page call picup.php below
require "Include/Config.php";
require "Include/Functions.php";
/*echo "Price: ".$_POST["ProdPrice"];
echo"<br>";*/
echo $_POST["amount"];
$amount = $_POST["amount"];
echo "<br>";
/*this change was made in 1-23-05*/
/*this extracts data from the fields in the person-per table*/
$tSQL = "SELECT * FROM person_per
where per_ID = $_SESSION[iUserID]";
$tEvents = RunQuery($tSQL);
$tRow = mysql_fetch_array($tEvents);
extract($tRow);
$FirstName = $tRow[per_FirstName];
$LastName = $tRow[per_LastName];
$Email = $tRow[per_Email];
$per_id = $trow[per_ID];
/*this extracts data from the fields in the eventinstance_evi table*/
$eSQL = "SELECT evi_ID FROM eventinstance_evi";
$eEvents = RunQuery($eSQL);
$eRow = mysql_fetch_array($eEvents);
extract($eRow);
$evi_ID = $eRow[evi_ID];
/*this extracts data from the fields in the donationamounts_dna table*/
$dSQL = "SELECT dna_don_ID FROM donationamounts_dna";
$dEvents = RunQuery($dSQL);
$dRow = mysql_fetch_array($dEvents);
extract($dRow);
$dna_don_ID = $dRow[dna_don_ID];
if ($amount = 0){
$inSQL = "Insert INTO event_reg (event_reg_evi_ID, event_reg_per_ID, event_reg_payment_ID) VALUES ($evi_ID, $per_ID, $dna_don_ID)";
$inregister=RunQuery($inSQL);
}else{
$inSQL = "Insert INTO event_reg (event_reg_evi_ID, event_reg_per_ID, event_reg_payment_ID, event_reg_payment) VALUES ($evi_ID, $per_ID, $dna_don_ID, $amount)";
$inregister=RunQuery($inSQL);
}