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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.