It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

FORM help Plz

FORM help Plz

Postby Mellisa11209 on Wed Oct 04, 2006 4:20 am

Hello all:

Great Forum!!

Now I am very new to to html and recently tired to create a website. I was cruising along when I got stumped. I have tried to do this on my own without having to post for help without any luck. I have been trying since last week. You all probably think the form in html is so very newbie and im sure your right lol. But I just can't seem to get this form to work right.

I want the information submitted in the form to go directly to my email if possible. I would also like to validate and require the user to enter Name, Email and Phone before they are able to "submit".

Any help would be GREATLY appretiated. Thank you for reading my post.

Below is the code that I am working with. I am working in Dreamweaver 8.

Thanks in advance.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style6 {font-family: Tahoma; font-size: 10px; }
-->
</style>
</head>

<body>
<table width="171" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="19" align="left" valign="middle" class="style6">Name:</td>
</tr>
<tr>
<td align="left" valign="middle" class="style6"><input name="Name" type="text" style="width:171px; height:18px; font-family:tahoma; font-size:11px " /></td>
</tr>
<tr>
<td height="19" align="left" valign="middle" class="style6">E-mail address:</td>
</tr>
<tr>
<td align="left" valign="middle" class="style6"><input type="text" name="Email" style="width:171px; height:18px; font-family:tahoma; font-size:11px " /></td>
</tr>
<tr>
<td height="19" align="left" valign="middle" class="style6">Phone:</td>
</tr>
<tr>
<td align="left" valign="middle" class="style6"><input type="text" name="Phone" style="width:171px; height:18px; font-family:tahoma; font-size:11px " /></td>
</tr>
<tr>
<td height="19" align="left" valign="middle" class="style6">Type of Party or Program :</td>
</tr>
<tr>
<td align="left" valign="middle" class="style6"><select name="Party" style="width:171px; height:18px; font-family:tahoma; font-size:11px ">
<option>Test 1</option>
<option>Test 1</option>
<option>Test 1</option>
<option>Test 1</option>
<option>Test 1</option>
<option>Test 1</option>
<option>Test 1</option>
<option>Test 1</option>
<option>Test 1</option>
<option>Test 1</option>
<option>Test 1</option>
<option>Test 1</option>
<option>Test 1</option>
</select></td>
</tr>
<tr>
<td height="19" align="left" valign="middle" class="style6">Number of guests:</td>
</tr>
<tr>
<td align="left" valign="middle" class="style6"><select name="Guests" style="width:171px; height:18px; font-family:tahoma; font-size:11px ">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
<option>32</option>
<option>33</option>
<option>34</option>
<option>35</option>
<option>36</option>
<option>37</option>
<option>38</option>
<option>39</option>
<option>40+</option>
</select></td>
</tr>
<tr>
<td height="19" align="left" valign="middle" class="style6"><p>Event date:</p></td>
</tr>
<tr>
<td align="left" valign="middle" class="style6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="left" valign="middle">
<td width="53"><select name="Date" style="width:47px; height:18px; font-family:tahoma; font-size:11px ">
<option>Jan</option>
<option>Feb</option>
<option>Mar</option>
<option>Apr</option>
<option>May</option>
<option>Jun</option>
<option>July</option>
<option>Aug</option>
<option>Sep</option>
<option>Oct</option>
<option>Nov</option>
<option>Dec</option>
</select></td>
<td width="51"><select name="Date" style="width:47px; height:18px; font-family:tahoma; font-size:11px ">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
</select></td>
<td><select name="Date" style="width:66px; height:18px; font-family:tahoma; font-size:11px ">
<option>2006</option>
<option>2007</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
</select></td>
</tr>
</table></td>
</tr>
</table>
<form id="form1" name="form1" method="post" action="">
<input type="reset" name="Reset" value="Reset" />
<input type="submit" name="Reset2" value="Submit" />
</form>
<p>&nbsp;</p>
</body>
</html>



Mellisa
Mellisa11209
 
Posts: 2
Joined: Wed Oct 04, 2006 4:02 am
Location: nyc

Postby webmaster on Wed Oct 04, 2006 9:01 am

Hi and welcome to DEVPPL.

You need to use ASP or PHP to send emails from your site. Here's an simple example that you can try if your server supports PHP.

[php]<?php

if(isset($_POST['submit'])) {

$to = $POST['to'];
$subject = $_POST['subject'];
$message = $_POST['message'];
mail($to, $subject, $message);

echo "Your mail has been sent!";

} else { ?>

<form method="post">
To: <input type="text" name="to" /><br />
Subject: <input type="text" name="subject" /><br />
Message: <textarea name="message"></textarea><br />
<input type="submit" name="submit" value="send the mail" />

<?php } ?>[/php]

Good luck! :D
Make sure to check out our TNX Review and Link Vault Review
User avatar
webmaster
Site Admin
 
Posts: 2695
Joined: Tue Aug 17, 2004 1:07 pm
Location: Sweden

Postby Mellisa11209 on Wed Oct 04, 2006 2:49 pm

Hey thanks for the reply webmaster!!

My server does support PHP. But I am a liitle confussed on where to add that script you posted. Does that go into the main body of my contact.html? Or is it a seperate html page?

Sorry for not knowing much of what I am talking about :oops:

Is there anyway I can upload my html page?

Thnaks for responding and reading the post. :)

Mel
Mellisa11209
 
Posts: 2
Joined: Wed Oct 04, 2006 4:02 am
Location: nyc


Who is online

Users browsing this forum: No registered users and 8 guests