javascript - Validate a link to check a user login are not -
in website clicking link, if user login in website ,the page redirects page otherwise redirects login page how can validate page .can u give solution that.
you can done session. more detail session : link
<?php if(isset($_session['login'])) { header ("location:dashboard.php"); } else { header ("location: login.php"); } ?> in check if session set user login redirect dashboard.php or if session not set redirect login.php page.
in login page set session $_session['login'] 1 or 0 value. or can store username .
Comments
Post a Comment