MyBB Community Forums

Full Version: login to some pages with mybb database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
In that case you may want to set up your own sessions system (maybe PHP's session system). When you want to check a user's login, just check it in the database, then set your own cookies using http://php.net/setcookie

There's no way to have cookies span two different domains - this is a built-in security feature with web browsers.
ok so i first going to make echo word first then make the cookie thing
so here my new code

Quote:<?
echo("
<form action=\"lock.php\" method=\"post\">
Password:<input type=\"password\" name=\"password\" size=\"15\" />
<input type=\"hidden\" name=\"url\" value=\"ksbsm.co.cc/TESTING/lock.php\" />
<br /><input type=\"submit\" class=\"submit\" name=\"submit\" value=\"Login\" /></form></div><br />");

if($password == "ks")
{
echo "you get the password right";
}
else
{
echo "Password Wrong !!";
}






?>
it wouldn't say i get the pass right even i put in KS y ?
Instead of
if($password == "ks")
Try:
if($_POST['password'] == "ks")
Pages: 1 2 3