Jump to content

Loading please wait?


ratcateme

Recommended Posts

i am trying to make a page that will handle logins to my webmail script

i want the script to display

Loading your Mail...

while it loads the next page because it takes a while

here is my code

<?php
include('conf.php');
session_start();
if(isset($_POST['username']) && isset($_POST['password'])){
include('includes/POP3.php');
$pop3=new Net_POP3;
$pop3->connect($conf['pop3']['host'],$conf['pop3']['port']);
if($pop3->login($_POST['username'],$_POST['password'])){
	$_SESSION['username']=$_POST['username'];
	$_SESSION['password']=$_POST['password'];
	echo '
<html>
<head>
</head>
<body>
<h1>Loading your Mail...</h1>
<script type="text/javascript">
function int(){
window.location = "int.php";
}
setTimeout(int(), 10000);
</script>
</body>
</html>';
}
$pop3->disconnect();
exit();
}
?>

At the moment it use a javascript redirect but i doesn't work properly it just loads the page as soon as it loads and doesn't display the loading message.  i want to know if there is a way i can create a redirect like this in php and still display the loading text

(the 10000 is just to test but it has no effect??)

 

Scott.

Link to comment
https://forums.phpfreaks.com/topic/92406-loading-please-wait/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.