check 2 fields are =

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Jim_Bo
Forum Contributor
Posts: 390
Joined: Sat Oct 02, 2004 3:04 pm

check 2 fields are =

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

when they don't match, you don't do anything but echo.. so execution of the script continues on like normal.
Jim_Bo
Forum Contributor
Posts: 390
Joined: Sat Oct 02, 2004 3:04 pm

Post by Jim_Bo »

Hi,

Ok :oops:

Thanks
Post Reply