Jump to content

the fields are required in sendmail.php


ilikephp

Recommended Posts

Hello!!

 

I have this form:

<form method="post" action="sendmail.php">

                    <h4 align="left" class="red" dir="ltr"><strong>Name:</strong></h4>

                  <p align="left" class="red" dir="ltr">

                      <input type="text" name="name" size="25" />

                    </p>

                  <h4 align="left" class="red" dir="ltr"><strong>E-mail:</strong></h4>

                  <p align="left" class="red" dir="ltr">

                      <input type="text" name="email" size="25" />

                    </p>

                  <h4 align="left" class="red" dir="ltr"><strong>Message: </strong></h4>

                  <p align="left" class="red" dir="ltr">

                      <textarea rows="3" name="message" cols="20"></textarea>

                    </p>

                  <p align="left" class="red" dir="ltr"> </p>

                  <p align="left" class="red" dir="ltr">

                      <input name="B1" type="submit" class="readmore" value="SEND" />

                    </p>

                </form></td>

 

 

 

How can I let the user enter name, e-mail and comments or a message will appear: You should enter name, email and comments?

So the fields are required, because when they are empty, anyone can press send, and the empty msg will be sent.

 

Thankyou

Link to comment
https://forums.phpfreaks.com/topic/115980-the-fields-are-required-in-sendmailphp/
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.