02-14-2008, 03:39 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Posts: 28
Thanks: 9
|
If, else and ==
Hi, im pretty new to php, ive got some code see below from a contact form, but i need to match the email and confirm email fields, how can i do that.
php Code:
if(isValidForm ($strTempName, $strTempTelephone, $strTempMobile, $strTempEmail, $strTempConfirmEmail, $strTempCity)){ //Mail the form. //Call MaiForm Function. MailForm ($strTempName, $strTempAddress, $strTempPostcode, $strTempTelephone, $strTempMobile, $strTempEmail, $strTempConfirmEmail, $strTempCity, $strTempCelebration, $strTempStartDate, $strTempGroupSize, $strTempEnquiry, $strTempBrochure, $strTempHeardAbout) ; //Write out a thank you. //WriteMessage($strTempName, $strTempAddress, $strTempPostcode, $strTempTelephone, $strTempMobile, $strTempEmail, $strTempCity, $strTempCelebration, $strTempStartDate, $strTempGroupSize, $strTempEnquiry, $strTempBrochure, $strTempHeardAbout) ; echo "Thank you for your enquiry, a member of our reservation team will get back to you within 24 hours."; }else{ //Send an Error. echo "<div align=center" ; echo "It appears that you have left out one of the fields.<br>" ; echo "Please go back and fill in these missing fields.<br><br>" ; //Display the error. echo $strError ; }
There is more to the code but i think that is all of the relevant code.
Thanks in advance
Last edited by Wildhoney : 02-14-2008 at 04:42 PM.
|
|
|
|