1,105,286 Community Members

echo message before page redirect

Member Avatar
lisles
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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>";
	
}
Member Avatar
OS_dev
Junior Poster
108 posts since Feb 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 14 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
lisles
Junior Poster in Training
62 posts since Feb 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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
Member Avatar
OS_dev
Junior Poster
108 posts since Feb 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 14 [?]
Skill Endorsements: 0 [?]
 
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