I am having a problem with a form submit where some times variables are making it through and other times they are not. Can some one please help me figure out whats going on here? I have a sample of the code below
<?php
include '/mysql_connect.php';
include '/comment.html';
include '/newheader.php';
if($amount == '-1')
{
$amount = $amountother;
}
$date = time();
$dbdate = date("m/d/y G.i:s", $date);
mysql_query ("INSERT INTO donations (date, amount , howoften , cardtype , cardnumber , cardexpires , nameoncard ,
bankname , bankacct , bankacctname , name , class , address , city , state , zip , phone , email , matching ,
employer , bizaddress , bizphone , bizfax , infoestate , infostock , comments)
VALUES ('$dbdate' , '$amount' , '$howoften' , '$cardtype' , '$cardnum' , '$cardexp' , '$nameoncard' ,
'$bankname' , '$bankacct' , '$bankacctname' , '$name' , '$class' , '$address' , '$city' , '$state' ,
'$zip' , '$phone' , '$email' , '$matching' , '$employer' , '$bizaddress' , '$bizphone' , '$bizfax' ,
'$moreinfo_estate' , '$moreinfo_stock' , '$comments')")
or die ("Unsuccessful");
$address = "blah@blah.com;blah@blah.com";
$address_ary = explode(";", $address);
$headers = "From: Online Gift Form <siefkencp@sapc.edu> \n";
$headers .= "Content-type: text/html";
$msg = "This is a note that there is an online gift avalable. <br>";
$msg .= "Name: $name <br>";
$msg .= "Amount: $amount <br>
E-mail Address: $email <br>
<br>
<a href=\"www.blah.blah/blah\">Check the data base now?</a>";
foreach ($address_ary as $key => $value){
mail($address_ary[$key], $sub, $msg , $headers);
}
print "Success! We should send you a confirmation that the transaction has been completed with in the week.";
include '/newfooter.php';
//this include closes mysql
include '/close.php';
?>
Sometimes the info comes through and others no...
Any help or thoughts would be apreciated!
Chris