TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 02-14-2008, 03:39 PM   #1 (permalink)
The Contributor
 
Join Date: Jan 2008
Posts: 28
Thanks: 9
bmathers is on a distinguished road
Default 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.
bmathers is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 02:42 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design