postgresql - How to troubleshoot PHP db insertion error I can't produce on my computer (accessed via a web page) -
i have php on page form posts processing data , storing in postgres rds on aws. every time have used form, has worked fine me, have had 2 customers tell me ratings lost. second database insertion , email fine (so far know), first insertion doesn't work.
i have not been able reproduce error on computer either chrome or firefox. can recommend way troubleshoot this/reproduce error and/or speculate error might be? code below.
$statement = $db->prepare( "insert cleanerrating (cleaner_id, appt_id, user_id, timely, effective, comments) values (:contractor_id, :appt_id, :user_id, :timely, :effective, :comments)"); $statement->execute(array(':contractor_id'=>$arr['contractor_id'][0], ':appt_id'=>$appt_id, ':user_id'=>$user_id, ':timely'=>$timeliness, ':effective'=>$effectiveness, ':comments'=>$comments)); $statement = $db->prepare( "insert recur (recur, appt_id, user_id, created) values(:recur, :appt_id, :user_id, 'now')"); $statement->execute(array(':recur'=>$recur, ':appt_id'=>$appt_id, ':user_id'=>$user_id)); if($user_id){ include_once('email.php'); $mail->addaddress('hello@loq-ly.com'); $mail->addbcc($alertemail); $mail->ishtml(true); $mail->subject = "received user rating cleaning"; $mail->body = "we received rating cleaner ".$contractor_id." appointment ".$appt_id." of effectiveness: ".$effectiveness." , timeliness ".$timeliness." comments: ".$comments."<br><br>recur value is: ".$recur; $mail->send(); $mail->clearallrecipients();
Comments
Post a Comment