Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

php mail form


  • Please log in to reply

#16
knexor2

knexor2

    Member

  • Member
  • PipPip
  • 28 posts
Oops, I forgot the submit button in my original sample form. For a submit button, you just need <input type=submit value=Submit> between your form tags. Also, make sure you had an action in your opening form tag, targeting a php script to handle the form contents and send the email:

<!-- Sample form -->
<form name="myform" action="processing_script.php" method="post">
<input type="hidden" name="submitted" value="true">
<table>
<tr>
<td><input type="radio" name="vehicle" value="car">Car
<td><input type="radio" name="vehicle" value="truck">Truck
<td><input type="radio" name="vehicle" value="van">Van
<tr>
<td colspan=3>Email:<input type="text" name="email">
<tr>
<td><input type="checkbox" name="drive">Drive
<td><input type="checkbox" name="ride">Ride
<td>&nbsp;
<tr>
<td><input type="submit" value="Send Mail">
<td>
<td><input type="reset" value="Reset">
</table>
</form>


Also, if you are using someone else's server (a free host or something), you may not have the mail() function enabled. You may be able to contact your host support and request that this feature be enabled for your domain/subdomain.

$body = "$check1 was checked\n(radio buttons' name): $radio\nComments: $comments";

$check1, $radio, and $comments are the values of the form elements (the checkbox, with name check1; the radio button group, with name of radio; and the comments textarea, with name of comments). These variables are automatically expanded to their values when used in double quotes. The \n is the newline character.

If you would like me to just write you a form and processing script, PM me with your requirements.
  • 0

Advertisements


#17
TaNkZ101

TaNkZ101

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 327 posts
i thank you all for your help you've been very patient and understanding, expecially knexor2!
i've now learned some of the basic functions of php and how it works, which was my primary goal!
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP