Jump to content
#StayAtHome ×

samowns

Members
  • Content Count

    12
  • Joined

  • Last visited

Community Reputation

0 Neutral

About samowns

  • Rank
    Member
  1. I want to know that if i login as admin wel.php open and if i want to login as mod so mod.php open programs runs fine but when i login as admin or mod same session work i want different page scure
  2. <!DOCTYPE html> <html> <head> <style type="text/css" media="screen"> .ss { border-width: 1px; border-style:solid; width: 100px; height: 100px; </style> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title></title> <link rel="stylesheet" href=""> </head> <body> <form action="index.php" method="post"> <table align="center" class="ss"> <tr> <td>Name<input type="text" name="name"> </td> </tr> <tr> <td>Pass&nbsp:<input type="password" name="pass"> </td> </tr> <tr> <td>Email<input type="text" name="eml"> </td> <tr> <td><input type="submit" name="sb"> </td> </table> </form> </body> </html> <?php include "db.php"; session_start(); if(isset($_POST['sb'])) { $name=mysqli_real_escape_string($con, $_POST['eml']); $pass=mysqli_real_escape_string($con, $_POST['pass']); $usr=mysqli_real_escape_string($con,'user'); $std='std'; $type='admin'; $qer="select * from users where eml='$name' AND pass='$pass' AND type='$type'"; $sql=mysqli_query($con,$qer); $qer=" select * from users where eml='$name' AND pass='$pass' AND type='$std'"; $sql1=mysqli_query($con,$qer); $qer=" select * from users where eml='$name' AND pass='$pass' AND type='$usr'"; $sql3=mysqli_query($con,$qer); $fe=mysqli_fetch_array($sql); if(is_array($fe)) { $name=$name; $pass=$pass; { header("location:wel.php?msg=Scuessfull login"); } echo "Admin of this site"; } else if($fe=mysqli_fetch_array($sql1)){ if(is_array($fe)) $name=$name; $pass=$pass; echo "Moderator of the site"; { header("location:mod.php?msg=Scuessfull login"); } } else if($fe=mysqli_fetch_array($sql3)){ if(is_array($fe)) $name=$name; $pass=$pass; $_SESSION['eml'] =true; header("location:sim.php?msg=Scuessfull login"); echo "Simple user this site"; } else { echo "invalid pass"; } } ?>
  3. Hello guys am using mysql . login admin panel works fine .but when i use password=1' or '1' = '1 its also working some one please help me i want to safe admin panel here is my code if(isset($_POST['sb'])) { $result = mysql_query("SELECT * FROM admin WHERE eml='" . $_POST["eml"] . "' and pass= '". $_POST["pass"]."'"); $row = mysql_fetch_array($result); if(is_array($row)) { $_SESSION["eml"] = $row['eml']; hash($_SESSION["pass"] = $row['pass']; } else { $message = "<font color='#FF0000'>"."Invalid Username or Password!"."</font>"; } } if(isset($_SESSION["eml"])) { header("Location:./useradmin.php"); }
  4. query runs f9 but sir instead of 1 n 0. i want if 1 fees pending .if 0 no fees pending
  5. here is loginact.php i just want if user login see the profile restriction means if admin login they can change ..i think i need to put one field 'type' admin or user..plz somone figure out..am new to sql this code is running <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <link href="css/style.css" rel="stylesheet"> <head> <style> .red { color:#F00; font-size:15px; } </style> <?php include "header.php";?> <?php include ("db.php"); $error=""; ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head><?php session_start(); ?> <?php if(isset($_POST['sb'])) { $a=$_POST ['eml']; $b=$_POST['pass']; $c="select * from users where eml='$a' && pass='$b'"; $s=mysql_query ($c); $row=mysql_num_rows($s); if($row==1 ) { $_SESSION['eml']=$a; header("location:fetch.php?msg=Scuessfull login"); } else{ $error= "Invalid Email or Password *"; } } ?> </head> <body><?php if(isset($_GET['logout'])) { session_unregister('eml'); } ?> <h3>Admin Login </h3> <div class="usr"> <form action="loginact.php" method="post" required="required"> <div class="col-lg-6"><div class="input-group"> Email id<input type="text" class="form-control" name="eml" required="required"/> <br /> <div class="red"><?php if($error!="") { echo $error; } ?></div> Password<input type="password" class="form-control" name="pass" required="required"/><br /> <input style="width:100px;" class="btn-success k" type="submit" name="sb" value="Login"/> </form> </div> </body> </html>
  6. if you r using skype so logout skype n hide then ur server ill show green light .i was having same problem
  7. sir fees based on monthly charges....
  8. tnx bro i can implement ur code <3
  9. i got ur point sir...wot should i do ..u i need one table more? name fees history...plz help i got your point sir..
  10. sir i use tigger for updating fees...i jus want in my admiin area to flash those users with there pending fees. suposse id 1 simran..join date 7-10-2015 after 7-11-205 auto reminder in admin area 'id 1 simran fees is pending'
  11. hello guyz am newbie in mysql php..i want if any user register. in my admin area there is reminder of fees .like id 1 simran join date 7-10-2015 after 30 days in my admin area reminds simran's fees is pending..any one plz help me ...thnxx in advance here is table name users
  12. samowns

    HELLO

    Hello guyz am new here .. i love php am biginner in php so i find this forum
×
×
  • 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.