connect_error) die("Connection failed: " . $conn->connect_error); // else { // mysqli_set_charset($conn, "utf8"); // $stmt = $conn->prepare("UPDATE `".TABLE4."` 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=".MYSQL_HOST.";dbname="MYSQL_DB, MYSQL_USER, MYSQL_PASS); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "UPDATE `".TABLE4."` SET `PAY_STATUS` = '". $paystatus ."' WHERE `".TABLE4."`.`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; } ?>