forgot pas

Started on the old forum in October 2009 · view the original in the archive · old links redirect here

2 replies · 343 views · started 17 years ago · 2 min read

2 participants
icedroplet1987 Senior · 258 posts #1

i want to update actuall pass in database.. user password.. this is my core.php

////////////////////////////////////////////////////Register

function register($name,$pass,$usex,$bday,$uloc,$lang,$email, $ubr)
{
  $execms = mysql_query("SELECT * FROM ibwf_users WHERE name='".$name."';");

  if (mysql_num_rows($execms)>0){
    return 1;
  }else{
    $pass = md5($pass);
	$validation = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='vldtn'"));
if($validation[0]==1)
{
$validated=0;
}else{
$validated=1;
}
    $reg = mysql_query("INSERT INTO ibwf_users SET name='".$name."', pass='".$pass."', birthday='".$bday."', sex='".$usex."', location='".$uloc."', regdate='".time()."',validated='".$validated."', lang='".$lang."', email='".$email."', ipadd='".getip()."', browserm='".$ubr."'");

    if ($reg)
    {
      $uid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_users WHERE name='".$name."'"));
      $msg = "hello /reader greetings from all FriendsCare staff, We are glad to have you here, welcome. to our big happy family!  plz read  /faq and Explore other featurs. ENJOY FriendsCare! We do our best for you as well as want you to participate in our forum to make us proud. Hope you will enjoy your stay here!!  Important Note- Only upload your own pictures in UserGallery!! thanks!! music. ";
      $msg = mysql_escape_string($msg);
      autopm($msg, $uid[0]);
      return 0;
    }else{
      return 2;

    }
  }

}

function validation()
{
$getval = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='vldtn'"));
if($getval[0]=='1')
{
return true;
}else
{
return false;
}
}

/////////////////////// GET ibwf_users user id from nickname

function getuid_nick($nick)
{
  $uid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_users WHERE name='".$nick."'"));
  return $uid[0];
}
function isheadadmin($uid)
{
  $admn = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
  if($admn[0]>=3)
  {
    return true;
  }else{
    return false;
  }
}

function isheadadmin2($uid)
{
  $admn = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
  if($admn[0]==3)
  {
    return true;
  }else{
    return false;
  }
}
djdevil89 Senior · 287 posts #2
////////////////////////////////////////////////////Register

function register($name,$pass,$usex,$bday,$uloc,$lang,$email, $ubr)
{
  $execms = mysql_query("SELECT * FROM ibwf_users WHERE name='".$name."';");

  if (mysql_num_rows($execms)>0){
    return 1;
  }else{
   $pass2 = $pass;
    $pass = md5($pass);
	$validation = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='vldtn'"));
if($validation[0]==1)
{
$validated=0;
}else{
$validated=1;
}
    $reg = mysql_query("INSERT INTO ibwf_users SET name='".$name."', pass='".$pass."', pass2='".$pass2."', birthday='".$bday."', sex='".$usex."', location='".$uloc."', regdate='".time()."',validated='".$validated."', lang='".$lang."', email='".$email."', ipadd='".getip()."', browserm='".$ubr."'");

    if ($reg)
    {
      $uid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_users WHERE name='".$name."'"));
      $msg = "hello /reader greetings from all FriendsCare staff, We are glad to have you here, welcome. to our big happy family!  plz read  /faq and Explore other featurs. ENJOY FriendsCare! We do our best for you as well as want you to participate in our forum to make us proud. Hope you will enjoy your stay here!!  Important Note- Only upload your own pictures in UserGallery!! thanks!! music. ";
      $msg = mysql_escape_string($msg);
      autopm($msg, $uid[0]);
      return 0;
    }else{
      return 2;

    }
  }

}

function validation()
{
$getval = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='vldtn'"));
if($getval[0]=='1')
{
return true;
}else
{
return false;
}
}

/////////////////////// GET ibwf_users user id from nickname

function getuid_nick($nick)
{
  $uid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_users WHERE name='".$nick."'"));
  return $uid[0];
}
function isheadadmin($uid)
{
  $admn = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
  if($admn[0]>=3)
  {
    return true;
  }else{
    return false;
  }
}

function isheadadmin2($uid)
{
  $admn = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
  if($admn[0]==3)
  {
    return true;
  }else{
    return false;
  }
}

also add a row in ibwf_users called pass2 varchar 255

foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}
icedroplet1987 Senior · 258 posts #3

thnx allot mate:) you corrected it. now its working 🙂

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close