Jump to content

Check variable value, if not 1 then redirect.


LostAngel

Recommended Posts

Hello again, I have the following check:

 

<?php
session_start(); 
echo $_SESSION['count'];
if ( $_SESSION['count'] == "1" ) {
echo "logged in right!<br />";
}
<im guessing the redirect code goes here>
?>

 

I want the page to redirect to www.website.com IF $_SESSION['count'] is not 1...when I put a basic html redirect above, it redirected no matter what. I used this code:

echo "<META http-equiv=\"Refresh\" content=\"0; url=http://website.com\">";

 

 

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.