Attach onsubmit="return checkpasswords()" to your form tag.....
function checkpasswords() { df=document.forms["DisplayUser"]; if (df["password1"].value==df["password2"].value) { // Passwords matched, clear password2, allow form to submit df["password2"].value=""; return true; else { alert("Passwords did not match"); return false; } }
Cheers - Neil
> Message-ID: <002c01c45ca9$cffcdbe0$fe00000a@extendeddwc7l0> From: "Vincent Jordan" <vjordan@xxxxxxxxxxxxxxx> To: <php-db@xxxxxxxxxxxxx> Date: Sun, 27 Jun 2004 20:49:47 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0029_01C45C88.48576050" Subject: 2 requests: validate 2 password fields as equal and rewrite data
Could someone instruct me or point me in the right direction. I would like to have a <input type=password name=password> <input type=password name=password2> when submit it will check to se if password and password2 are = ( i do not want password2 to end up in POST on submit.)
======================================================== CaptionKit http://www.captionkit.com : Production tools for accessible subtitled internet media, transcripts and searchable video. Supports Real Player, Quicktime and Windows Media Player.
VideoChat with friends online, get Freshly Toasted every day at http://www.fresh-toast.net : NetMeeting solutions for a connected world.
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php