Posted: Fri Sep 01, 2006 1:35 am
Problem is that it goes from form to link to link ..
Cheers
Cheers
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
if (array_key_exists("confirm",$_REQUEST)) {
//Delete code here
echo '<br />Sub category & images were successfully deleted<br /><br /><br />Please wait while you are redirected ...
if (array_key_exists("confirm",$_REQUEST)) {
//Delete code here
echo '<br />Sub category & images were successfully deleted<br /><br /><br />Please wait while you are redirected ...
<meta http-equiv="refresh" content="3; url='.$_POST['referer'].'">';
}else{
echo 'Do you really want to delete this sub category and all its images?';
echo '<br /><br /><a href="index.php?action=process&process=delete_subcat&subcat_id='.$_GET['subcat_id'].'&confirm=y">Yes</a> - <a href="#" onClick="history.go(-1)">No</a>';
}
break;
}else{
echo 'Do you really want to delete this sub category and all its images?';
echo '<br /><br /><a href="index.php?action=process&process=delete_subcat&subcat_id='.$_GET['subcat_id'].'&confirm=y">Yes</a> - <a href="#" onClick="history.go(-1)">No</a>';
}Code: Select all
<?php
$this_page = basename(__FILE__);
?>
<form method="post" action="page2.php">
<input type="hidden" name="referer" value="<?php echo $this_page; ?>" />
<!-- Other HTML form field -->
</form>Code: Select all
<?php
$referer = $_POST['referer'];
/* Handle the rest of the form processing here */
/* and present the user with a choice */
?>
<form method="post" action="page3.php">
<input type="hidden" name="referer" value="<?php echo $referer; ?>" />
<input type="hidden" name="delete_id" value="<?php echo $id_passed_through_php; ?>" />
<!-- Other HTML form field for confirmation -->
</form>Code: Select all
<?php
$referer = $_POST['referer'];
/* Handle all actual processing */
/* Then either header() redirect OR */
/* Meta redirect in the HTML output */
/* Using the $referer var as your ultimate location */
?>