$pass = $GET_[pass]; if ($pass == admin) { echo "Welcome!";
<a href='?page=admin.php&?pass=admin'>Admin</a>
can someone tell me why that isnt working?
two things I can see
1) you don't really need $pass = $GET_["pass"];
2) replace your link with this: <a href="?page=admin.php&pass=admin">Admin</a> notice that &?pass was changed to &pass
if ($GET_[pass] == admin) { echo "Welcome!"; }
<a href='?page=admin.php&pass=admin'>Admin</a>
still not working..
if ($pass == admin) { echo "Welcome!"; }
<a href="?page=admin.php&pass=admin">Admin</a>
nope
if ($pass == "admin") { echo "Welcome!"; }
ok, im doing $GET from inside a included page when the main page has a $GET also, its looking like thats whats messing me up.. :-\ does it matter? or am i just coding wrong?
see above (admin didn't have quotes around it)
thnx i think, still isnt working, but ill figure it out. im just gonna trash the idea and start over hehe
$_GET['pass']
yeah, I think this is a case of accidentally switching where the underscore should be, as scoppc pointed out.
You would use:
if ($_GET['pass'] == admin) { echo "Welcome!"; }