Html form help.

SOLLERBOY

macrumors 6502a
Original poster
Aug 8, 2008
713
68
UK
Hi guys, I just created a form with html and have set it up so when the submit button is pressed the form is sent via e-mail. I was wandering if it was possible that once the submit button was pressed a new window will pop up saying thanks??
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,857
7
USA
Assuming the form processing is done in PHP you can use the header function redirect the user after a successful email send. That redirect can simply go to a thanks page.
 
Comment

SOLLERBOY

macrumors 6502a
Original poster
Aug 8, 2008
713
68
UK
sorry, haven't got a clue what you just said. I am only using basic html as I'm a noob. I saw a tutorial online but it looked far too complicated. I'm using the predefined features etc with a bit of hand coding.
 
Comment

angelwatt

Moderator emeritus
Aug 16, 2005
7,857
7
USA
Well, then we'd need to see the code you're working with the give a possible solution.
 
Comment

SOLLERBOY

macrumors 6502a
Original poster
Aug 8, 2008
713
68
UK
Well, then we'd need to see the code you're working with the give a possible solution.
Here you go. It's rough and basic. It's my first website in DW after using text edit.

<!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=UTF-8" />
<title>Register</title>
<style type="text/css">
<!--
body,td,th {
font-family: Tahoma, Geneva, sans-serif;
font-size: 10px;
color: #000;
}
-->
</style></head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><h1>Register</h1>
<p>Welcome to GreenBee Motors. In order to place your order you must first register your interest with us. A representative will then invite you out to our showroom to discuss out Build To Order options. Please register your details below. </p></td>
</tr>
<tr>
<td><form id="form1" name="form1" method="post" action="mailto:greenbeeorders@greenbee.com">
<p>
<label>Forename
<input type="text" name="Forename" id="Forename" />
</label>
<label>Surname
<input type="text" name="Surname" id="Surname" />
</label>
</p>
<p>Gender
<label>
<input type="radio" name="radio" id="Male" value="Male" />
Male</label>
<label>
<input type="radio" name="radio" id="Female" value="Female" />
Female</label>
</p>
<p>Date Of Birth
<label>Day
<select name="Day" id="Day">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
</label>
<label>Month
<select name="Month" id="Month">
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select>
</label>
<label>Month 19
<select name="Month 19" id="Month 19">
<option>01</option>
<option>02</option>
<option>03</option>
<option>04</option>
<option>05</option>
<option>06</option>
<option>07</option>
<option>08</option>
<option>09</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>
<option>41</option>
<option>42</option>
<option>43</option>
<option>44</option>
<option>45</option>
<option>46</option>
<option>47</option>
<option>48</option>
<option>49</option>
<option>50</option>
<option>51</option>
<option>52</option>
<option>53</option>
<option>54</option>
<option>55</option>
<option>56</option>
<option>57</option>
<option>58</option>
<option>59</option>
<option>60</option>
<option>61</option>
<option>62</option>
<option>63</option>
<option>64</option>
<option>65</option>
<option>66</option>
<option>67</option>
<option>68</option>
<option>69</option>
<option>70</option>
<option>71</option>
<option>72</option>
<option>73</option>
<option>74</option>
<option>75</option>
<option>76</option>
<option>77</option>
<option>78</option>
<option>79</option>
<option>80</option>
<option>81</option>
<option>82</option>
<option>83</option>
<option>84</option>
<option>85</option>
<option>86</option>
<option>87</option>
<option>88</option>
<option>89</option>
<option>90</option>
<option>91</option>
<option>92</option>
<option>93</option>
<option>94</option>
</select>
</label>
</p>
<p>
<label>Address Line 1
<input type="text" name="Address Line 1" id="Address Line 1" />
</label>
</p>
<p>
<label>Address Line 2
<input type="text" name="Address Line 2" id="Address Line 2" />
</label>
</p>
<p>
<label>Postcode
<input name="Postcode" type="text" id="Postcode" value="" size="8" maxlength="6" />
</label>
</p>
<p>
<label>Daytime Telephone number (
<input name="Daytime telephone number" type="text" id="Daytime telephone number" value="Area" size="5" maxlength="5" />
</label>
)
<label>
<input name="number" type="text" id="number" value="Extension" size="20" maxlength="10" />
</label>
</p>
<p>
<label>What is a suitable time for us to call you?
<input name="What is a suitable time for us to call you?" type="text" id="What is a suitable time for us to call you?" size="45" />
</label>
</p>
<p>What Products are you interested in?</p>
<p>
<label>
<input type="checkbox" name="GreenBee XL" id="GreenBee XL" />
GreenBee XL</label>
</p>
<p>
<label>
<input type="submit" name="button" id="button" value="Submit" />
</label>
</p>
</form></td>
</tr>
</table>
(c) 2009 GreenBee Motors, inc. All rights Reserved. 'GreenBee' and 'GreenBee XL' are trademarks of GreenBee Motors inc.
</body>
</html>
 
Comment

angelwatt

Moderator emeritus
Aug 16, 2005
7,857
7
USA
Please use the HTML code block (the <> button on the toolbar) when posting HTML code. It's very hard to read when you just post it as is.

It looks like you're currently processing the form at all, just using a mailto: link in the action. You need to use PHP or another server side language to process the form. There are tutorials for doing this though, just be sure to follow one that takes security in mind. You should also check out your class book as you seem to be missing some very important skills. Making a registration form takes a bit of code for doing validation and everything. It would be very hard to get you started here considering the code you have right now.
 
Comment

SOLLERBOY

macrumors 6502a
Original poster
Aug 8, 2008
713
68
UK
Please use the HTML code block (the <> button on the toolbar) when posting HTML code. It's very hard to read when you just post it as is.

It looks like you're currently processing the form at all, just using a mailto: link in the action. You need to use PHP or another server side language to process the form. There are tutorials for doing this though, just be sure to follow one that takes security in mind. You should also check out your class book as you seem to be missing some very important skills. Making a registration form takes a bit of code for doing validation and everything. It would be very hard to get you started here considering the code you have right now.
Thanks for the advice. College in the uk is for 16-18 year olds the it's university ( so slightly different from us if you didn't know). The college I go to is very basic, the task is very basic. use as many tools as possible to create a website for a lifestyle product. We don't have servers etc so I can only test on my machine. I had to do the submission using e-mail as I have nothing else to work with. Because everything we are assigned to do is always so basic I run into difficulty all the time with no help. It's Do xx by xx. That's it.

Thanks for the help though. i guess i will have to leave it as it is.
 
Comment

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,872
2
Alexandria, VA, USA
You're in college - help often means doing the research on your own. Find a tutor or teacher's aid if you really get stuck.

It also might earn you some points if you casually inform your professor or whoever is in charge to invest in academic discounted licensed copies of WAMP or MAMP. The first is for Windows, the second is for Mac, both integrate an Apache web server, MySQL database and PHP into your computer depending on your platform. Install one and turn your computer into a server perfect for development and testing locally. Google each for further details and trial downloading.

Then you can start learning how to become a web developer, which means not just the front end form, but processing it back on via PHP. Plus you'll have a local database to play with for more complex projects in the future. For the record, this assumes your UK university doesn't have a computer lab. Something tells me you're not telling us the complete story, I understand colleges are different across the pond, but... not THAT different!

My .02

-jim
 
Comment

SOLLERBOY

macrumors 6502a
Original poster
Aug 8, 2008
713
68
UK
You're in college - help often means doing the research on your own. Find a tutor or teacher's aid if you really get stuck.

It also might earn you some points if you casually inform your professor or whoever is in charge to invest in academic discounted licensed copies of WAMP or MAMP. The first is for Windows, the second is for Mac, both integrate an Apache web server, MySQL database and PHP into your computer depending on your platform. Install one and turn your computer into a server perfect for development and testing locally. Google each for further details and trial downloading.

Then you can start learning how to become a web developer, which means not just the front end form, but processing it back on via PHP. Plus you'll have a local database to play with for more complex projects in the future. For the record, this assumes your UK university doesn't have a computer lab. Something tells me you're not telling us the complete story, I understand colleges are different across the pond, but... not THAT different!

My .02

-jim
We do have an It suite but it's a very basic one. Core 2 duo pcs on a basic line network.
 
Comment

Similar threads

  • Macintosh1984
2
Replies
2
Views
216
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.