I'm updating my site to a more mobile friendly responsive design using jquerymobile. Usually I have the user login and after checking the details are correct it will refresh them onto a new page. However, I can't get this working with jquerymobile. Presumably this is because of the Ajax override features? Ajax is currently foreign to me :) The abridged script is like below:
else
//else, all ok proceed with login
{
if(isset($_GET['redirect']))
{header ("Refresh: 0; URL=" . $_GET['redirect'] . "");}
else{header ("Refresh: 0; URL=cohome.php");
echo "Your login was successful, you are being redirected in one second <br />";
echo "(If your browser doesn't support this, <a href=\"cohome.php\">click here</a>)";}
}
many thanks
Actually, to simplify things. I have the same problem with my logout button.
<a href="logout.php">
which leads to
<?php
session_start();
// make double sure that logged out.
$_SESSION['logged'] = "0";
session_destroy();
header("Refresh: 0; URL=index.php");
echo "You have been logged out.<br />";
echo "You are being redirected to the homepage!<br />";
echo "(If your browser doesn't support this, <a href=\"index.php\">click here</a>)";
?>
Unfortunately, no redirect occurs. It works fine on my standard site, only since starting to change over to jquery mobile.