Gotcha, for the refresh, try
<meta http-equiv=refresh content=5; URL=YOURURLHERE>
And that should be your 5 second refresh..
and for the issue..
<?php
session_start();
// Check if he wants to login:
if (!empty($_POST[username]))
{
require_once("connect.php");
// Check if he has the right info.
$query = mysql_query("SELECT * FROM members
WHERE username = '$_POST[username]'
AND password = '$_POST[password]'")
or die ("Error - Couldn't login user.");
$row = mysql_fetch_array($query)
or die ("Error - Couldn't login user.");
if (!empty($row[username])) // he got it.
{
$_SESSION[username] = $row[username];
echo "Welcome $_POST[username]! You've been successfully logged in.";
exit();
}
else // bad info.
{
echo "Error - Couldn't login user.<br /><br />
Please try again.";
exit();
}
}
?>
take out the exit(); and then anything after those should work.. so if you are posting any extra text after that, it will actually load. The "exit();" completely drops the page, so unless you do an include you aren't going to have anything after it.. Make it look like:
<?php
session_start();
// Check if he wants to login:
if (!empty($_POST[username]))
{
require_once("connect.php");
// Check if he has the right info.
$query = mysql_query("SELECT * FROM members
WHERE username = '$_POST[username]'
AND password = '$_POST[password]'")
or die ("Error - Couldn't login user.");
$row = mysql_fetch_array($query)
or die ("Error - Couldn't login user.");
if (!empty($row[username])) // he got it.
{
$_SESSION[username] = $row[username];
echo "Welcome $_POST[username]! You've been successfully logged in.";
}
else // bad info.
{
echo "Error - Couldn't login user.<br /><br />
Please try again.";
}
}
?>
Hopefully that resolves the issue, and if not, try explaining it to me a little differently :P
Oh.. and do you have this posted on the internet?