Code: Select all
$sql1 = "Insert into tblPublicSignings (ID,SigningTransID, campaignNo, SignerName, SignerPhone, SignerEmail, Date) Values (NULL,'".$SigningTransID."','".$campaignNo."','".$SignerName."','".$SignerPhone."','".$SignerEmail."','". $Date."')";
$res1 = mysqli_query($mysqli, $sql1) or die("sql1 didn't work");Code: Select all
function testStuff($campaignNo,$SignerName, $SignerPhone, $Date,$SignerEmail,$SigningTransID)
{
$sql1 = "Insert into tblPublicSignings (ID,SigningTransID, campaignNo, SignerName, SignerPhone, SignerEmail,Date) Values (NULL,'".$SigningTransID."','".$campaignNo."','".$SignerName."','".$SignerPhone."','".$SignerEmail."','". $Date."')";
$res1 = mysqli_query($mysqli, $sql1) or die("sql1 didn't work");
}
testStuff($campaignNo,$SignerName, $SignerPhone, $Date,$SignerEmail,$SigningTransID);
I keep getting the "sql1 didn't work" message.
I've done this (run queries from within a function) lots of times before without problems. The queries also work fine directly in MySQL. What could possibly be going wrong for me that I haven't thought of?
Thanks.