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>";
	
}

Edited by lisles: n/a

2
Contributors
3
Replies
7
Views
7 Years
Discussion Span
Last Post by OS_dev
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

0

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

Work perfectly

Awesome!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.