Jump to content

PHP Form info send to email address


spainsoccerfreak

Recommended Posts

OK SO I got these html and php working to send info to my email got

conditions if for example name is empty display a message but

I want it when the press the send button if the require field

is not field not to go to the next page and send me email here the

php for email condition

 

<code>

//E-Mail validation

 

if(empty($email))

 

        echo "<br/> Please enter your email address.";

   

 

    else

 

        // IF USER ENTERED AN INVALID EMAIL ADDRESS

        if(preg_match('/.*@.*\..*/',  $email) > 0)

   

            echo "<br/>Email: $email";

   

        else

     

echo " <br/> Email: Please enter a valid email address.";

 

 

 

//E-Mail validation

 

Link to comment
https://forums.phpfreaks.com/topic/142973-php-form-info-send-to-email-address/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.