1.11M Members

echo message before page redirect

 
0
 

I want to echo a message before redirecting.the message gets displayed but it disappears very soon.is it possible to increase the time of display before redirect.this is my code

if($result)
 {echo "Data has been edited";
redirect('edit.php');
  }
else
{
echo "<p>cannot update your data<p>";
}
function redirect($loc){	
	echo "Reset done Succesfully!";
	echo "<script>window.location.href='".$loc."'</script>";
	
}
 
0
 

I want to echo a message before redirecting.the message gets displayed but it disappears very soon.is it possible to increase the time of display before redirect.this is my code

if($result)
 {echo "Data has been edited";
redirect('edit.php');
  }
else
{
echo "<p>cannot update your data<p>";
}
function redirect($loc){	
	echo "Reset done Succesfully!";
	echo "<script>window.location.href='".$loc."'</script>";
	
}

use an html redirect so that you can specify how much time to allow before redirect. Just search google for html redirect and you can literally copy and paste.

 
0
 

thanx.i did it using the html redirect code
echo "<meta http-equiv='Refresh' content='2; URL=dis_edit.php'>";

Work perfectly

Question Answered as of 4 Years Ago by OS_dev
 
0
 

thanx.i did it using the html redirect code
echo "<meta http-equiv='Refresh' content='2; URL=dis_edit.php'>";

Work perfectly

Awesome!

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article