Tech Support Forum banner
Status
Not open for further replies.
1 - 6 of 6 Posts

· Premium Member
Joined
·
6,569 Posts
Discussion Starter · #1 · (Edited)
Hi I need to know if I can connect an table to an email address. I want a person to be able to click submit and have the information in the table to be sent to my email so that i can contact the customer.

Here is what I have for a table:
HTML:
<table>
<tr>
<td>Name</td><td><input type=text name="Name" size=30 maxlength=50 value="">
</tr>
<tr>
<td>Email Address</td><td><input type=text name="Email_Address" size=30 maxlength=50 value="">
</tr>
<tr>
<td>Phone Number</td><td><input type=text name="Phone_Number" size=30 maxlength=50 value="">
</tr>
<tr>
<td>Comments:</td><td><textarea name=exComments rows=8 cols=50></textarea>
</td>
</tr>
<tr>
<td> </td><td align=center><input type=submit class=button value="Submit"></td>
</tr>
</table>
Besides this I am lost.

Cheers!
 

· TSF Team, Emeritus
Joined
·
2,386 Posts
This should work.

HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>test</title>
<style type="text/css">
td.center {text-align: center}
</style>
</head>
<body>
<form action="MAILTO:[email protected]" method="post" enctype="text/plain">
<table>
<tr>
<td>Name</td><td><input type="text" name="Name" size="30" maxlength="50" value=""></input>
</td></tr>
<tr>
<td>Email Address</td><td><input type="text" name="Email_Address" size="30" maxlength="50" value=""></input>
</td></tr>
<tr>
<td>Phone Number</td><td><input type="text" name="Phone_Number" size="30" maxlength="50" value=""></input>
</td></tr>
<tr>
<td>Comments:</td><td><textarea name="exComments" rows="8" cols="50"></textarea>
</td></tr>
<tr>
<td> </td><td class="center"><input type="submit" class="button" value="Submit"></input></td>
</tr>
</table>
</form>
</body>
</html>
[/code]

The most significant change is the addition of the <form>. Everything else is just XHTML Strict 1.0 validation (but you could use the DTD HTML Strict 4.01).

Remember to close your elements! :)
 

· TSF Team, Emeritus
Joined
·
2,386 Posts
All markup that I post is valid XHTML 1.0 with CSS Level 2.1. This is why I take twenty minutes to three hours longer than everyone else to get my ideas onto the web.

I don't know if your PHP will be very impressed with the mailto attribute, but you can see.
 
1 - 6 of 6 Posts
Status
Not open for further replies.
Top