try{ $stmt = $conn->prepare('INSERT INTO favourites (nameID,UserID) VALUES (:nameID, :UserID);'); $stmt->execute(array( ':nameID' =>$_POST['nameID'], ':UserID' =>$_POST['UserID'] )); $count = $stmt->rowCount(); if($count > 0 ) { echo "<span style='font-size:100%;color:red;'>❤️"; } else { echo "unsuccessful"; } } catch(PDOException $error) { echo $error->getMessage(); } ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)