Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General


Ask about general coding issues or problems here.

Moderators: macek, egami, gesf


Postby vamshi » Wed Jul 17, 2013 2:27 am

hi, i am new to php i have my page i have password and re-type password text box's so when two password matches it has to submit otherwise it has to show error password mismatch pls help me
New php-forum User
New php-forum User
Posts: 1
Joined: Wed Jul 17, 2013 2:22 am

Re: php

Postby johnj » Wed Jul 17, 2013 7:45 pm

1).write a form to collect both the passwords

2).at the place where you process these passwords (you will have to collect the two passwords from the form), do something like this:
Code: Select all

$password = $_POST['password'];
$retypedpassword = $_POST['retypepassword'];

if ($password === $retypedpassword)
    echo "The passwords match";
    echo "The passwords do not match";
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Return to PHP coding => General

Who is online

Users browsing this forum: landi and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.