0

cOkay So I'm having an issue when running this code

           $techsig        = $_POST['Tech'];
           $clientsig      = $_POST['Client'];
           $satisfaction   = $_POST['optradio'];
           $summary        = $_POST['summary'];
           $asummary       = $_POST['accom_summary'];
           $rating         = $_POST['accom_rating'];
           $complete = "Completed";
           var_dump($woID);
           var_dump($asummary);
           var_dump($rating);

          $stmt = $conn->prepare("UPDATE accommodation SET rating = ?, summary = ? WHERE work_order = ?");
          $stmt->bind_param("isi", $rating, $asummary, $woID);
          $stmt->execute();

Now when I run the code as follows in my database UPDATE accommodation SET summary = 'Testing', rating = '5' WHERE work_order = '12345' it works without any issues same as if I run it on the page, Also if I do the following code like

$stmt = "UPDATE accommodation SET rating = '$rating', summary = '$asummary' WHERE work_order = '$wonum' ";
$update_accom = mysqli_query($connection,$stmt);

it also works but when I do it as $stmt = $conn->prepare("query") then bind the params it throws a boolean error.

now it might be a simple error but i cant find the issue

0 Answers0