Re: Re: Problem with function
| From: | Nathan Rixham | Date: | Fri, 12 Sep 2008 13:31:24 +0000 |
| Subject: | Re: Re: Problem with function | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-279989@lists.php.net to get a copy of this message | ||
Jason Pruim wrote:
On Sep 12, 2008, at 8:53 AM, Nathan Rixham wrote:actually on closer inspection the problem looks here.. following requires 16 params:Jason Pruim wrote:Okay, when I had that in the notify_email.php file it looked like it all loaded just fine... the echo's were displayed. When I put that in my process.php file I got this output: already loaded and required defaults loaded Just before send_email functionjust after send_email funtion require func.sendemail.php loaded already loaded and required dbmysqliconnect loaded execute error Duplicate entry '0' for key 1 So I think Jochem might be right... Problem with mysqli? -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 11287 James St Holland, MI 49424 www.raoset.com japruim@raoset.comnothing obvious to me.. so debug more! <?PHP function notify_email($Record, $salesRepID) {echo "in notify_email" . PHP_EOL; require("defaults.php"); echo "already loaded and required defaults loaded" . PHP_EOL; require("func.sendemail.php"); echo "require func.sendemail.php loaded" . PHP_EOL; require("dbmysqliconnect.php"); echo "already loaded and required dbmysqliconnect loaded" . PHP_EOL;will tell you where it's breaking I'd assume..
mysqli_stmt_prepare($stmt, "UPDATE purl.schreur SET
FName = ?,
LName = ?,
email = ?,
phone = ?,
record = ?,
subscribed = ?,
date = ?,
IPAddress = ?,
Business = ?,
Address1 = ?,
City = ?,
State = ?,
Zip = ?,
Coffee = ?,
Meeting = ?,
time = ?")
or die("prepare error " . mysqli_error($link));
17 params bound AND rdoTime + areaPlans are in wrong order or are just wrong..
mysqli_stmt_bind_param($stmt, 'ssssssssssssssss',
$_POST['txtFName'],
$_POST['txtLName'],
$_POST['txtEmail'],
$_POST['txtPhone'],
$_POST['record'],
$_POST['subscribed'],
$date,
$_SERVER['REMOTE_ADDR'],
$_POST['txtBusiness'],
$_POST['txtAddress1'],
$_POST['txtCity'],
$_POST['txtState'],
$_POST['txtZip'],
$_POST['rdoCoffee'],
$_POST['rdoTime'],
$_POST['areaPlans'])
or die( "bind error " . mysqli_error($link));
may help; probable causing the duplciate error problem; (doesn't explain first error though)