Hey guys, had a quick PHP question. I've been using a small PHP script to authenticate logged in users which redirects them to another page if they're not logged in. I'd like to change it so that instead of redirecting them to a different page, it hides a <div> element on my page, and shows another which pops up on top. I have my <div>'s, so all I need is to edit the PHP code now. Here is the code I currently have:
<?
session_start();
if(!session_is_registered(myusername)){
header("location:main.html");
}
?>
If anyone has any ideas how to do this please let me know. I know how to show and hide <div>'s with javascript, but I'm not very experienced with PHP.
<?
session_start();
if(!session_is_registered(myusername)){
header("location:main.html");
}
?>
If anyone has any ideas how to do this please let me know. I know how to show and hide <div>'s with javascript, but I'm not very experienced with PHP.