Jump to content

bordetaning

New Members
  • Posts

    6
  • Joined

  • Last visited

bordetaning's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hey guys, HOpe you can help me. I need a code about "Lock out after serveral attemps", and "Change password after first login"
  2. Thanks a lot for the assistance. Appreciate it,
  3. Hi Sir Guru, I do apologize I still don't get it. what do you mean conditional? so we are able to check the user level by "$rs=mysql_fetch_array($result);" , what would be the condition to use if the system has already check the the level, like if $rs["level"]=1; { $extra = 'Level1.php'; } else if $rs["level"]=2; { $extra = 'Level2.php'; } Please help in right flow for this to work. Sorry again for being slow about this. Many thanks
  4. Hi Sir Guru, Thanks for clarifying a lot of things i'm just new to this and you're right I've encountered a lot of errors I was forced to develop this project for our capstone subject. So for the column the column level, how do would you create a query to check for the level # and proceed with the corresponding level # page? because my lo-gin page has only the username and password field? Hope to hear from you. Thanks a lot.
  5. Hi Guru Sir, Here is my sample code below, what else do i need to add in order to check the "level" field and proceed? Many thanks. <?php session_start(); if(isset($_POST['log2'])){ if(!empty($_POST['use']) && !empty($_POST['pass'])){ include 'dbconfig.php'; $msg=""; $use=$_POST['use']; $pws=$_POST['pass']; $query="select * from admin where username='".$use."' and password=md5('".$pws."')"; $result=mysql_query($query) or die(); if(mysql_num_rows($result)==1) { $rs=mysql_fetch_array($result); $_SESSION['user']=$rs["Fname"]; $use=$_SESSION['user']; $dif=$rs["date_login"]; $query="update admin set date_login='".$time."',last_date='".$dif."' where Fname='".$use."'"; mysql_query($query) or die("ASDFSDF".mysql_error()); $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); $extra = 'Levelpage.php'; ?> <script type="text/javascript" > window.location="<?php echo "http://$host$uri/$extra";?>"; </script>
  6. Hi, I have a question is this situation possible below? sample database table Information ID, Username,Password,level 1 user1 Pass1 1 2 user2 Pass2 2 I want a php code i which when I login my username and password it will check 3 fields in the table, the username and password if it matches from the database and the it will check what level is the user. So if ever username and password is correct it will check if what level is the user, so if the users level is 1 it will go to level1.php page and if 2 it will go to level2.php Hope you can help me with this problem of mine.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.