connect_error) die("Connection failed: " . $conn->connect_error); // else { // mysqli_set_charset($conn, "utf8"); // $stmt = $conn->prepare("UPDATE `scc_pg_19` SET `PAY_STATUS` = '?' WHERE `ID` =?"); // $stmt->bind_param("si", $paystatus,$id); // if ($stmt->execute()) { // echo '

Updated Successfully!!

'; // } else { // echo "Error:
Contact Web admin " . mysqli_error($conn); // exit(); // } // $stmt->close(); // } // $conn->close(); try { $conn = new PDO("mysql:host=$host;dbname=$db", $user, $pass); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "UPDATE `scc_pg_19` SET `PAY_STATUS` = '". $paystatus ."' WHERE `scc_pg_19`.`ID` = $id"; // Prepare statement $stmt = $conn->prepare($sql); // execute the query $stmt->execute(); // echo a message to say the UPDATE succeeded echo '

Updated Successfully!!

'; } catch (PDOException $e) { echo $sql . "
" . $e->getMessage(); } $conn = null; } ?>