How Do I Change My Password?

I’ve created a code to change a password. Now it seem contain an error. When I fill in the form to change password, and click save the error message:

You forgot enter your user id!
Please try again.

I really don’t know what the error message means. Please guys. Help me fix it.

Here’s is the code:

< ?php # change password.php

//set the page title and include the html header.
$page_title = 'Change Your Password';
//include('templates/header.inc');

if(isset($_POST['submit'])){//handle the form
 require_once('connectioncomplaint.php');//connect to the db.
 //include "connectioncomplaint.php";

 //create a function for escaping the data.
 function escape_data($data){
  global $dbc;//need the connection.
  if(ini_get('magic_quotes_gpc')){
   $data=stripslashes($data);
  }
  return mysql_real_escape_string($data);
 }//end function

 $message=NULL;//create the empty new variable.

 //check for a username
 if(empty($_POST['userid'])){
  $u=FALSE;
  $message .='

You forgot enter your userid!'; }else{ $u=escape_data($_POST['userid']); } //check for existing password if(empty($_POST['password'])){ $p=FALSE; $message .='

You forgot to enter your existing password!

'; }else{ $p=escape_data($_POST['password']); } //check for a password and match againts the comfirmed password. if(empty($_POST['password1'])) { $np=FALSE; $message .='

you forgot to enter your new password!

'; }else{ if($_POST['password1'] == $_POST['password2']){ $np=escape_data($_POST['password1']); }else{ $np=FALSE; $message .='

your new password did not match the confirmed new password!

'; } }

2 ANSWERS

February 16, 2017 at 10:15 am admin

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.

#activate_pack, .topic-pack {
    background-color: #1ABC9C;
    color:#fff;
    padding:10px 20px;
    cursor:pointer;
    display: inline-block;
}
.knowledge .breadcrumbs {
    background-color: #00a4ef;
    color: #ffffff;
    height: 70px;
    width: 100%;
}

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.
Thanks

May 10, 2017 at 10:30 pm admin

sddfs

May 10, 2017 at 10:30 pm admin

werwerwer

May 12, 2017 at 9:53 am admin

bla bla

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.