Hi friends I have a PHP file as Shown below and I need to call a stored procedure inside javascript ie When i confirm yes I need to call the stored procedure . How should I include the following php code in IF loop of js(ie when i confirm yes)
This is the stored procedure:
$sql = "CALL procedure(?);";
$parameters = array($buyer_user_id);
$query = $this->db->query($sql, $parameters);
This is the PHP file:
<?php
echo "<script>if (confirm('are u sure ?')) {";
echo "}";
echo " else {";
echo "}</script>";
?>