Page 1 of 1

check 2 fields are =

Posted: Thu Apr 14, 2005 5:05 pm
by Jim_Bo
Hi,

Whats the correct code for this:

Code: Select all

<?php

if(!$email_address2)

{
echo '*';
}

if(($email_address) != ($email_address2)) {
 	echo '<font class="txt">* Email addresses dont match!</font>';
}

?>
I thought I had it sussed ..But dont get the correct messages displayed .. and when the addresses dont match it still continues and sends the from ..

thanks

Posted: Thu Apr 14, 2005 6:53 pm
by feyd
when they don't match, you don't do anything but echo.. so execution of the script continues on like normal.

Posted: Thu Apr 14, 2005 10:18 pm
by Jim_Bo
Hi,

Ok :oops:

Thanks