Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // this is the code
- if($conn) {
- if ($_SERVER["REQUEST_METHOD"] == "POST") {
- $just = $_POST["just"];
- $sql_ref = "UPDATE adopteur
- SET etat_demande = 'acceptee', explication = '{$just}'
- WHERE id_adopteur = {$id_adopteur}";
- // executer la requete
- $query = mysqli_query($conn,$sql_ref);
- if($query) {
- echo "<script>confirm('updated')</script>";
- header("location:$url");
- }
- else {
- echo "<script>confirm('not updated')</script>";
- }
- }
- }
- // this is the error i get
- Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'accepte cette demande parceque je suis entrain de tester' WHERE id_a...' at line 2 in C:\xampp\htdocs\adoption_website\info_demand_accepte.php:15 Stack trace: #0 C:\xampp\htdocs\adoption_website\info_demand_accepte.php(15): mysqli_query(Object(mysqli), 'UPDATE adopteur...') #1 {main} thrown in C:\xampp\htdocs\adoption_website\info_demand_accepte.php on line 15
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement