Anyone know how to call goBack()
in php?
It keep telling me:
Fatal error: Call to undefined function goBack()
and I don't know why..
Here is my PHP Code:
<?php
include "config.php";
include "session_user.php";
?>
<script>
function goBack(){
alert();
window.history.go(-1);
}
</script>
<?php
if(isset($_GET['d'])):
$stmt = $mysqli->prepare("DELETE FROM bom_equipment WHERE bom_eqp_id=?");
$stmt->bind_param('s', $id);
$id = $_GET['d'];
if($stmt->execute()):
goBack();
else:
echo "<script>alert('".$stmt->error."')</script>";
endif;
endif;
?>
Any suggestion?