Jump to content

gnetuk

Members
  • Posts

    50
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

gnetuk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ////////////////////////////////////phyco copy right } else $pwd = ($_POST['pwd']); $query = "SELECT empid FROM users WHERE $pwd='empid'"; $result = mysql_query($query); if ($pwd=$result) { header("Location: setpass.php?msg=ERROR: you dont have the password...."); }else sorry to spam this is working now as long as the first charickor in the empid field has one letter it will work is it my sql table that's causing the problem?
  2. im not sure whats happening but if my password is 1 thats the only time it will not ask to change the pass.
  3. also i have noticed that it will only work if there employee id = 1 the number any tother number or letter makes the setpass.php load and that sould only load if there password matches the empid.
  4. varchar(200) latin1_general_ci No is this it?
  5. Oh this is only working for letter atm, and not numbers.
  6. couldn't paste all that that I wrote gona get me a beer. this forum is ace love it!!!!!!!!!!!!!
  7. ////////////////////////////////////phyco copy right }else $pwd = ($_POST['pwd']); $query = "SELECT empid FROM users WHERE empid=$pwd"; $result = mysql_query($query); if(!mysql_num_rows($result)) { header("Location: setpass.php?msg=ERROR: you dont have the password...."); }else //Password matches an employee ID thanks to phyco//////////////////////////////////////////// //this forum is the best, ill be honest I know very little about //php apart from asking you guys for code I do understand but its //hard for me as I can only read it atm im still gona plod along //best I can.......... //Phyco you did it here's my bit I added that worked (and I wont //be lazy education like u gave is far better than someone just //handing it me on a plate)
  8. } $pwd = ($_POST['pwd']); $qry = "SELECT empid FROM users WHERE empid='{$pwd}'"; $sql = mysql_query($qry); $res = mysql_fetch_array($sql); if($res['pwd'] != 1){ header("Location: setpass.php?msg=ERROR: you dont have the password...."); }else // all this dose it make evey user whos empid dose not match goto the setpass.php (I only want users that match to go to promt them to change threre password) { header("Location: myaccount.php"); } //echo "Logged in..."; Hi when the user enters there password in the pwd field I need the sql to check the empid in the database (this is not md5 encrypted) then if the empid = the post password they enterd then it will goto the promt to change the password.
  9. you got it bro the password is there empid but they should be promped to change it at first login, no flaws in anyones code here but I sill not getting my desired result.
  10. hi im going to try it out but its if the empid maches the password they use to login with basicly the user registerd there password is there empid then when they login with there $_post pwd wich is not in md5 format if it is the same as empd then togo to the setpass page. see what I mean the md5 will always be encrypted that's a seprrate field in my db
  11. $md5pass = md5($_POST['pwd']); $selectuser="SELECT empid FROM users WHERE empid='$_POST[pwd]'"; $selectuser2=mysql_query($selectuser); $selectuser3=mysql_fetch_array($selectuser2); if ($selectuser3[empid]=$_POST['pwd']) { //die ("ERROR: password is empid."); header("Location: setpass.php?msg=ERROR: you dont have the password...."); } That's was not code that was just what I wanted to do I cannot write code as im self teached php here is my code
  12. Hi all Its me again, I been trying to get this to work for ages now on my own with no joy so I gona need a lttle help Ok I have a login page and I want the page to login and redirect to another page if the password matches a certern field. IF $_POST[pwd] = empid then goto setpass.php Just need the code as my coding is not working
  13. Thanks so much for that, I will try when i get home not sure if there is a thankyou button on here but thanks again, all the best ch0cu3r g-
  14. Hello all good day. I am working on my new project atm, and it requires that registerd users will have rank status, 0 , 1 , 2 , 3 , 4 4=SUPER ADMIN ok i need so that anyone less than rank 3 can use the registration form. I cant provode my code as my www is on local host and im away from that pc atm. so in a nut shell SELECT rank from users where name = SESSION_['user'] IF rank = < 3 die (you dont have privlage) Hope you guys can help g-
  15. Hi all. Can someone tell me why i get two emails when somone has activated on my site. I only need the one lol. heres my code <?php session_start(); include ('dbc.php'); if (!isset($_GET['usr']) && !isset($_GET['code']) ) { header("Location: register.php?msg=ERROR: You have not activated PLEASE USE VALID E-MAIL...."); }else $rsCode = mysql_query("SELECT activation_code from usersgnet where user_email='$_GET[usr]'") or die(mysql_error()); list($acode) = mysql_fetch_array($rsCode); if ($_GET['code'] == $acode) { mysql_query("UPDATE usersgnet set user_activated=1 where user_email='$_GET[usr]'") or die(mysql_error()); mail( 'webmaster@gnetuk.net', 'ACTIVATION A C T I V A T E D D O N E new member SET', 'Check the http://gnetuk.net/forum/admin/index.php', "From: \"www.gnetuk.net DO NOT REPLY\" <postmaster@gnetuk.net>\r\n" . "X-Mailer: PHP/" . phpversion()); }else { header("Location: register.php?msg=ERROR: You have not activated PLEASE USE VALID E-MAIL...."); die("chedktjhe. Pultravigenslips.."); } ?> Any ideas. gnetuk :-)
×
×
  • 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.