Jump to content

Trying to create submit button to e-mail


LaC0saNostra
 Share

Recommended Posts

Hello everybody. I am trying to have the form send the information to the specified e-mail:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Edward Schubauer's Web Form</title>
<link href="web_form_page_css.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content ="text/html; charset=utf-8"/>
</head>
<body>
<div align="center">
<h1> My Personal Web Form</h1>
</div>
<p> I have been working diligently on this website. My portal page has some sample information and my CSS page has different examples of what concepts I have learned. At this point I would greatly appreciate if I could get some feedback on my webpage with the form below for you the user to fill out! Every person that gives me feedback will allow for vital information to improve the experience on this website. As always, your time will be greatly appreciated. Thank you. </p>
<input type="hidden" name="ToAddress" value="LaC0saNostra11@gmail.com" />
<table border="0" width="75%" align="left">
<tr>
<td align="right" width="10%">Name: </td>
<td><input type="text" name="CustName" id="CustName" size="30" />
</td>
</tr>
<tr>
<td align="right">Address: </td>
<td><input type="text" name="CustAddress" id="CustAddress" /> </td>
</tr>
<tr>
<td align="right">City: </td>
<td><input type="text" name="CustCity" id="CustCity" /> </td>
</tr>
<tr>
<td align="right">State: </td>
<td><input type="text" name="CustState" id="CustState" /> </td>
</tr>
<tr>
<td align="right">Zip Code: </td>
<td><input type="text" name="CustZipCode" id="CustZipCode" /> </td>
</tr>
<tr>
<td align="right">Country: </td>
<td><input type="text" name="CustCountry" id="CustCountry" /> </td>
</tr>
<tr>
<td colspan="2">Additional Feedback:<br />
<textarea rows="4" cols="60" name="CustComment"
id="CustComment">Please enter any feedback that comes to mind.</textarea></td>
</tr>
<tr>
<td align="right"><input type="submit" value="Send" /></td>
<td><input type="reset" value="Reset" /></td>
</tr>
</table> <br />
Please rate my webpage: <br /> <br />
<input type="radio" name="Rating" id="strongly_dislike"
value="Strongly Dislike" /> Strongly Dislike<br />
<input type="radio" name="Rating" id="dislike"
value="Dislike" /> Dislike<br />
<input type="radio" name="Rating" id="like"
value="Like" /> Like<br />
<input type="radio" name="Rating" id="strongly_like"
value="Strongly Like" /> Strongly Like<br />
<input type="radio" name="Rating" id="love"
value="Love" /> Love<br /><br />
</form>
</body>
</html>
When I click submit it says:
Error!

Your form does not specify what address to send the email to. Refer to the instructions on using this form-to-email processor in your course assignment. Form element names must match the ones specified in the instructions, and are case sensitive.

 

How do I fix this issue?

web_form_page.html

web_form_page_css.css

post-170676-0-04840100-1392302434_thumb.jpg

Edited by LaC0saNostra
Link to comment
Share on other sites

I am trying to add a hidden input element with a name of "CCAddress" and an empty string for the value. I am brand new to HTML and PHP and I thought you can only declare one hidden input element per form?
<form action="http://cdlwebsysdev....rm-to-email.php" method="post">
<input type="hidden" name="ToAddress" value="LaC0saNostra11@gmail.com" />
I want to be able to CC other e-mails in but I am having trouble understanding the correct way to do this. Any further advice?
Link to comment
Share on other sites

Nevermind after some tweaking I feel I am almost there:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Edward Schubauer's Web Form</title>
<link href="web_form_page_css.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content ="text/html; charset=utf-8"/>
</head>
<body>
<div align="center">
<h1> My Personal Web Form</h1>
</div>
<p> I have been working diligently on this website. My portal page has some sample information and my CSS page has different examples of what concepts I have learned. At this point I would greatly appreciate if I could get some feedback on my webpage with the form below for you the user to fill out! Every person that gives me feedback will allow for vital information to improve the experience on this website. As always, your time will be greatly appreciated. Thank you. </p>
<input type="hidden" name="ToAddress" value="LaC0saNostra11@gmail.com" />
<input type="hidden" name="CCAddress" value="todd.wolfe@esc.edu" />
<input type="hidden" name="Subject" value="WSD: Assignmebnt 2.2-Web Form for Edward Schubauer" />
<input type="text" name="FromAddress" />
<table border="0" width="75%" align="left">
<tr>
<td align="right" width="10%">Name: </td>
<td><input type="text" name="CustName" id="CustName" size="30" />
</td>
</tr>
<tr>
<td align="right">Address: </td>
<td><input type="text" name="CustAddress" id="CustAddress" /> </td>
</tr>
<tr>
<td align="right">City: </td>
<td><input type="text" name="CustCity" id="CustCity" /> </td>
</tr>
<tr>
<td align="right">State: </td>
<td><input type="text" name="CustState" id="CustState" /> </td>
</tr>
<tr>
<td align="right">Zip Code: </td>
<td><input type="text" name="CustZipCode" id="CustZipCode" /> </td>
</tr>
<tr>
<td align="right">Country: </td>
<td><input type="text" name="CustCountry" id="CustCountry" /> </td>
</tr>
<tr>
<td colspan="2">Additional Feedback:<br />
<textarea rows="4" cols="60" name="CustComment"
id="CustComment">Please enter any feedback that comes to mind.</textarea></td>
</tr>
<tr>
<td align="right"><input type="submit" value="Send" /></td>
<td><input type="reset" value="Reset" /></td>
</tr>
</table> <br />
Please rate my webpage: <br /> <br />
<input type="radio" name="Rating" id="strongly_dislike"
value="Strongly Dislike" /> Strongly Dislike<br />
<input type="radio" name="Rating" id="dislike"
value="Dislike" /> Dislike<br />
<input type="radio" name="Rating" id="like"
value="Like" /> Like<br />
<input type="radio" name="Rating" id="strongly_like"
value="Strongly Like" /> Strongly Like<br />
<input type="radio" name="Rating" id="love"
value="Love" /> Love<br /><br />
</form> <br /><br /><br /><br /><br /><br />
<p>
src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
</p>
</body>
</html>
The problem is it will not send the form information to my e-mail. Where did I go wrong here?
Link to comment
Share on other sites

It looks like in your latest post you changed the value of the forms action, to point to the form page itself, and not the PHP page from your first post.

Edited by thescientist
Link to comment
Share on other sites

So this is what I have now:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Edward Schubauer's Web Form</title>
<link href="web_form_page_css.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content ="text/html; charset=utf-8"/>
</head>
<body>
<div align="center">
<h1> My Personal Web Form</h1>
</div>
<p> I have been working diligently on this website. My portal page has some sample information and my CSS page has different examples of what concepts I have learned. At this point I would greatly appreciate if I could get some feedback on my webpage with the form below for you the user to fill out! Every person that gives me feedback will allow for vital information to improve the experience on this website. As always, your time will be greatly appreciated. Thank you. </p>
<input type="hidden" name="ToAddress" value="LaC0saNostra11@gmail.com" />
<input type="hidden" name="CCAddress" value="todd.wolfe@esc.edu" />
<input type="hidden" name="Subject" value="WSD: Assignmebnt 2.2-Web Form for Edward Schubauer" />
<input type="text" name="FromAddress" />
<table border="0" width="75%" align="left">
<tr>
<td align="right" width="10%">Name: </td>
<td><input type="text" name="CustName" id="CustName" size="30" />
</td>
</tr>
<tr>
<td align="right">Address: </td>
<td><input type="text" name="CustAddress" id="CustAddress" /> </td>
</tr>
<tr>
<td align="right">City: </td>
<td><input type="text" name="CustCity" id="CustCity" /> </td>
</tr>
<tr>
<td align="right">State: </td>
<td><input type="text" name="CustState" id="CustState" /> </td>
</tr>
<tr>
<td align="right">Zip Code: </td>
<td><input type="text" name="CustZipCode" id="CustZipCode" /> </td>
</tr>
<tr>
<td align="right">Country: </td>
<td><input type="text" name="CustCountry" id="CustCountry" /> </td>
</tr>
<tr>
<td colspan="2">Additional Feedback:<br />
<textarea rows="4" cols="60" name="CustComment"
id="CustComment">Please enter any feedback that comes to mind.</textarea></td>
</tr>
<tr>
<td align="right"><input type="submit" value="Send" /></td>
<td><input type="reset" value="Reset" /></td>
</tr>
</table> <br />
Please rate my webpage: <br /> <br />
<input type="radio" name="Rating" id="strongly_dislike"
value="Strongly Dislike" /> Strongly Dislike<br />
<input type="radio" name="Rating" id="dislike"
value="Dislike" /> Dislike<br />
<input type="radio" name="Rating" id="like"
value="Like" /> Like<br />
<input type="radio" name="Rating" id="strongly_like"
value="Strongly Like" /> Strongly Like<br />
<input type="radio" name="Rating" id="love"
value="Love" /> Love<br /><br />
</form> <br /><br /><br /><br /><br /><br />
<p>
src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
</p>
</body>
</html>
The error I am getting is:
Error!

You do not have permission to use this script from another URL.

 

I am very confused at this point and after reading your guys posts

Link to comment
Share on other sites

I was able to figure it out:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Edward Schubauer's Web Form</title>
<link href="web_form_page_css.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content ="text/html; charset=utf-8"/>
</head>
<body>
<div align="center">
<h1> My Personal Web Form</h1>
</div>
<p> I have been working diligently on this website. My portal page has some sample information and my CSS page has different examples of what concepts I have learned. At this point I would greatly appreciate if I could get some feedback on my webpage with the form below for you the user to fill out! Every person that gives me feedback will allow for vital information to improve the experience on this website. As always, your time will be greatly appreciated. Thank you. </p>
<input type="hidden" name="ToAddress" value="LaC0saNostra11@gmail.com" />
<input type="hidden" name="CCAddress" value="todd.wolfe@esc.edu" />
<input type="hidden" name="Subject" value="WSD: Assignmebnt 2.2-Web Form for Edward Schubauer" />
<input type="text" name="FromAddress" />
<table border="0" width="75%" align="left">
<tr>
<td align="right" width="10%">Name: </td>
<td><input type="text" name="CustName" id="CustName" size="30" />
</td>
</tr>
<tr>
<td align="right">Address: </td>
<td><input type="text" name="CustAddress" id="CustAddress" /> </td>
</tr>
<tr>
<td align="right">City: </td>
<td><input type="text" name="CustCity" id="CustCity" /> </td>
</tr>
<tr>
<td align="right">State: </td>
<td><input type="text" name="CustState" id="CustState" /> </td>
</tr>
<tr>
<td align="right">Zip Code: </td>
<td><input type="text" name="CustZipCode" id="CustZipCode" /> </td>
</tr>
<tr>
<td align="right">Country: </td>
<td><input type="text" name="CustCountry" id="CustCountry" /> </td>
</tr>
<tr>
<td colspan="2">Additional Feedback:<br />
<textarea rows="4" cols="60" name="CustComment"
id="CustComment">Please enter any feedback that comes to mind.</textarea></td>
</tr>
<tr>
<td align="right"><input type="submit" value="Send" /></td>
<td><input type="reset" value="Reset" /></td>
</tr>
</table> <br />
Please rate my webpage: <br /> <br />
<input type="radio" name="Rating" id="strongly_dislike"
value="Strongly Dislike" /> Strongly Dislike<br />
<input type="radio" name="Rating" id="dislike"
value="Dislike" /> Dislike<br />
<input type="radio" name="Rating" id="like"
value="Like" /> Like<br />
<input type="radio" name="Rating" id="strongly_like"
value="Strongly Like" /> Strongly Like<br />
<input type="radio" name="Rating" id="love"
value="Love" /> Love<br /><br />
</form> <br /><br /><br /><br /><br /><br />
<p>
src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
</p>
</body>
</html>
Thank you for the feedback guys.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...