Access to pages upon login
Posted 02 March 2006 - 01:32 PM
I accept from the users when logging in: login and pass and validate these. So far this works
For users not logged in I only want to have links to pages like: home, register, login, about.
But I want more for users who are logged in? I know I'm probably confusing, but does anybody understand what I'm trying to say?
$login = $_POST['login'];
$pass = $_POST['pass'];
$chklogin = @mysql_query("SELECT loginname,loginpass FROM login WHERE
loginname = '$login' AND loginpass = '$pass'");
$chkuser = @mysql_query("SELECT loginname FROM login WHERE loginname = '$login'");
if (mysql_num_rows($chkuser) == 1)
if (mysql_num_rows($chklogin) == 1)
echo '<p><b>Login successful</b></p>';
echo '<input type="submit" name="<href="#"" value="HOME">';
- this is probably where the code should go etc.....
- or re-direct them to a page with all links etc and output their loginname on all pages from there on
Posted 02 March 2006 - 01:55 PM
Posted 02 March 2006 - 09:22 PM
I can display the 2nd set of links but it will display them in the body??
Is there any way that I could display all links on homepage but do a check to see if a user is logged in before displaying it, that way "banning" users that arent logged in from going there?????
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users