Code: Select all
if(mysqli_query($con, $sql)){
echo "<script> alert('You have successfully updated.');
window.location.href='javascript:history.go(-2)';
</script>";
}else{
echo "An error has occurred. Please go back and check the code: ".mysqli_error($con);
}I also tried:
Code: Select all
if(mysqli_query($con, $sql)){
echo "<script> alert('You have successfully updated.');
window.location.href='01T.php?id=$id';
</script>";
}else{
echo "An error has occurred. Please go back and check the code: ".mysqli_error($con);
}How do I redirect the browser to the same id that I edited (via the edit.php page) to see the results, using a more proper PHP solution?