Jump to content

md3inaustin

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

md3inaustin's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Below is the code I have written for a change password form.  The form displays the change password form if none of the fields are filled out, other wise it tries to process the request and then display a results page.  It works somewhat, but so far a user has to submit the form 2 times in order for it to work.  Does anyone know of a more simple way to create a change password form that verifies the current password before allowing a password change?  I haven't found anything yet on the net. 'Ppreciate any assistance. [b]Below is the code:[/b] [code]<?php include("library/titlebar.php"); mysql_query("UPDATE employees SET tmppass=password('$oldpassword') WHERE employeeid='$employeeid'"); if ($oldpassword == null) {   echo $chngpassform; }elseif ($row["tmppass"] != $row["password"]) {   echo $error1;   echo $chngpassform; } else {   mysql_query("UPDATE employees SET password=password('$newpassword') WHERE employeeid='$employeeid'");   echo $results; } ?>[/code]
×
×
  • 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.