Help - Search - Members - Calendar
Full Version: E-mail forms, how do I.......
Forums > Resource Center > Webmasters' Corner > Webmasters' Corner Resolved Topics
miiszxclassiic
Ok so I'm using an e-mail form on my site and someone keeps sending a blank form and when i get it in my e-mail it shows no ip address.

How can i make it so the required fields have to be filled in order for the form to be submitted. Is there a code?
The Markster
Could you please show us your whole PHP script? (I'm assuming it's in PHP.)

Btw, shouldn't this go in the Designers' Cubicle? _smile.gif
miiszxclassiic
Sorry I didn't know where to post it.
But this is what I'm using. It sends fine and goes straight to my e-mail but someone keeps sending blank forms and I want to make it so that the form wont be sent without the name and e-mail address being submitted.

Here is the form:

CODE

<INPUT TYPE="hidden" NAME="to" VALUE="me@e-mail.com">
<INPUT TYPE="hidden" NAME="form" VALUE="www.mysite.com">
<INPUT TYPE="hidden" NAME="admin" VALUE="me@e-mail.com">
<INPUT TYPE="hidden" NAME="language" VALUE="en"> <p>


<form action="http://www.hostmonster.com/monstermail" enctype="multipart/form-data" method="POST">

<b>Name</b>: <br>
<input type="text" name="Name"><br>

<b>Email</b>: <br>
<input type="text" name="mailfrom"><br>

<b>Site Url</b>: <br>
<input type="text" name="Site Url:"><br>

<b>Message</b>:<br>
<TEXTAREA NAME="Message:" ROWS="6" COLS="32" > </TEXTAREA> <br>


<input type="hidden" name="sendtoemail" value="me@e-mail.com"><br>
<input type="hidden" name="redirect" value="http://www.mysite.com/thanks.php" target="main">
<input type="hidden" name="subject" value="Contact">
<input type="submit" value="Send">
</form>


The Markster
Hmm, is there an actual PHP script that processes the email? Or are you using one of those email forms from other sites?
miiszxclassiic
Hmm no.. I got it off a script in my cpanel _unsure.gif
miiszxclassiic
do you suggest that i try using a php script?
The Markster
QUOTE(miiszxclassiic @ Jul 28 2007, 11:37 PM) *
do you suggest that i try using a php script?

Yep, I think you should do that. Cause I don't think there's anyway you can customize it like you want to if you use a premade one that you can barely edit.
miiszxclassiic
okay. Where can I find the easiest to use php e-mail form
YourSuperior
Maybe going to the following sites may help:
http://www.ibdhost.com/contact/
http://www.free-php.net/index.php?search=contact+form
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.