\n"; $order_step = 1; } } //end loop //check email if (!strstr($u_email, '@') && !strstr($u_email, '.')){ $e_msg .= "Please enter a valid email address.
\n"; $order_step = 1; } // if Other Amt is selected, check to see if input valid. if ($_POST['d_amt'] == ""){ //no selection if (!is_numeric($_POST['d_other'])){ $order_step = 1; $e_msg .= "Please specify a valid gift amount.
\n"; }else { $cc_amt = $_POST['d_other']; } } else { $cc_amt = $_POST['d_amt']; } $gift_amt = "$" . $cc_amt; //$hid_array = array("u_empphone","u_empcont","u_empname","u_gift","u_sal", "u_fname","u_lname","u_addr","u_city","u_state","u_zip","u_ctry","u_hmphone","cc_name","cc_num","cc_month","cc_year"); // $hid_flds = ""; // for ($i = 0; $i <= sizeof($hid_array); $i++) { // $hid_flds .= ""; // } if ($order_step == 3) { $trans = array($_POST['cc_num'], $cc_amt ,"","",$_POST['cc_month'],$_POST['cc_year']); //executes the trans, use "N" to simulate failure $cc_result = charge_cc($trans,"F"); //done execute, handle RESULT if ($cc_result["RESULT"] == 0) { $u_sql = "insert into userinfo (u_fname,u_minit,u_lname, u_empphone, u_empcont, u_empname, u_empmatch, u_gift, u_sal, u_addr, u_city, u_state, u_zip, u_ctry, u_hmphone,u_email, u_refer) "; $u_sql .= "values ('{$_POST['u_fname']}','{$_POST['u_minit']}', '{$_POST['u_lname']}', '{$_POST['u_empphone']}', '{$_POST['u_empcont']}', '{$_POST['u_empname']}', '{$_POST['u_empmatch']}', '{$_POST['u_gift']}', '{$_POST['u_sal']}', '{$_POST['u_addr']}', '{$_POST['u_city']}', '{$_POST['u_state']}', '{$_POST['u_zip']}', '{$_POST['u_ctry']}', '{$_POST['u_hmphone']}','{$_POST['u_email']}', '{$_POST['refer']}')"; $u_result = mysql_query($u_sql); $u_newid = mysql_insert_id(); //new record ID here. //now insert transaction record into other table and use $u_newid as the foregin key. $u_sql = "insert into trans (d_u_id,d_date, d_src, d_amt, d_ref) "; $u_sql .= "values ('$u_newid', now(),'{$_POST['d_src']}', '$cc_amt', '{$cc_result['PNREF']}')"; $u_result = mysql_query($u_sql); //send notification of gift gift_notify($_POST['d_amt']); //thank donor - updated 1/05/04 $donor_ary = array($_POST['u_sal'],$_POST['u_fname'],$_POST['u_lname'],$_POST['u_addr'],$_POST['u_city'],$_POST['u_state'],$_POST['u_zip'],$cc_amt,$_POST['u_email']); thank_donor($donor_ary); //when done close connection mysql_close($conn); } else { // transaction failed $order_step = 1; $e_msg = "Your credit card failed, the reason was: " . $cc_result["RESPMSG"] . "
Please try again."; // Tell user cc failed, include why & redraw form with their input } } } else { $order_step = 1; } ?> sitesALIVE Foundation - How to Give



SUPPORT US - SECURE ONLINE CREDIT CARD TRANSACTION
sitesALIVE Foundation is a non-profit, tax-exempt, 501(c)3 organization.
All donations are tax-deductible.
Thank you for your support.

Donor Information
Salutation*
First Name* " >
Last Name* " onChange="javascript:update_cc();" >
Address* " >
City* " >
State / Province* ">
Postal Code* " >
Country* " >
Home Phone " >
Email* " >
Gift Amount*
Other: Specify Amount $ " onChange="document.form1.d_amt.options[0].selected=true;">
Does your employer have
a matching gift program?
   Yes >  |    No >
Employer name ">
Employer phone ">
Contact Person ">
   
Cards Accepted
Name on Card*
Card Number*
Expiry* /
   
*Required field  
Donor Information
Salutation
Name
Address
City
State / Province
Postal Code
Country
Home Phone
Email
Gift Amount
Employer name  
Employer Phone Number
Contact Person
 
Name on Card
Number on Card
Expiry (month/year)
 
 

Thank You! You will receive a formal acknowledgment of your donation and
receipt by mail. Please know that we deeply appreciate your support of the
sitesALIVE Foundation and that your gift will serve as a cornerstone in our
efforts to support and improve K-12 education. We are honored to have you
as a partner in our efforts.

 

Home | About the Foundation | Support the Foundation | Use of Funds | Our Boardmembers | Contact

We are a registered 501(c)3 not for profit organization