tags:

views:

31

answers:

3

hello. Hello, I want to make this registration script tell the user when the passwords they have entered are not matching.

and i use this code:

 if ($_POST['pass' != 'pass2'])
 {
  echo
   ("Oops! Password did not match! Try again. ");
 }

please help me to correct my coding. :-( thanks so much!

+1  A: 
if ($_POST['pass'] != $_POST['pass2'])
cherouvim
thank you so much. :P
mayumi
+2  A: 

You can't reference both the variables inside the same $_POST

if ($_POST['pass']!= $_POST['pass2'])
 {
     echo("Oops! Password did not match! Try again. ");
 }
controlfreak123
hey.. thank you so much. :-)
mayumi
Just a suggestion you should get in the habit of accepting answers when you feel they are correct. Otherwise people will be hesitant to answer them in the future
controlfreak123
A: 
if ($_POST['pass']!= $_POST['pass2'])
 {
     echo("Oops! Password did not match! Try again. ");
 }

.. i will use this code. and it also works. :-)

.. thanks for helping.

mayumi