PDA

View Full Version : Problem posting data from a page


gwolfe7
04-18-2008, 12:26 AM
I have a page created in Dreamweaver CS2 with fields for name, email address, an area for text and 4 check boxes. The only area I'm receiving a post from is the text area.

Any ideas? Would anyone be willing to review the code?

Thanks

edbr
04-18-2008, 01:32 AM
post the code

gwolfe7
04-18-2008, 01:49 AM
<!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>
<!-- contact us main page -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>frenn photography creative portraits for family children high school seniors and business portraits</title>
<link href="../styles.css" rel="stylesheet" type="text/css" />
<script language="JavaScript">
<!--
function mmLoadMenus() {
if (window.mm_menu_1122105450_0) return;
window.mm_menu_1122105450_0 = new Menu("root",153,20,"Arial, Helvetica, sans-serif",12,"#000000","#C8A468","#D1AA71","#000000","center","middle",1,0,1000,-5,7,true,true,true,0,false,false);
mm_menu_1122105450_0.addMenuItem("speciality&nbsp;items","location='http://www.frennphotography.com/speciality_items.htm'");
mm_menu_1122105450_0.addMenuItem("specials","location='http://www.frennphotography.com/children/children_specials.htm'");
mm_menu_1122105450_0.addMenuItem("price&nbsp;and&nbsp;packages","location='http://www.frennphotography.com/children/price_packages.htm'");
mm_menu_1122105450_0.addMenuItem("clothing&nbsp;tips","location='http://www.frennphotography.com/children/clothing_tips.htm'");
mm_menu_1122105450_0.addMenuItem("faqs","location='http://www.frennphotography.com/children/faqs.htm'");
mm_menu_1122105450_0.addMenuItem("our&nbsp;guarantee","location='http://www.frennphotography.com/guarantee.htm'");
mm_menu_1122105450_0.hideOnMouseOut=true;
mm_menu_1122105450_0.bgColor='#555555';
mm_menu_1122105450_0.menuBorder=1;
mm_menu_1122105450_0.menuLiteBgColor='#FFFFFF';
mm_menu_1122105450_0.menuBorderBgColor='#CCCCCC';
window.mm_menu_1122110118_0 = new Menu("root",153,20,"Arial, Helvetica, sans-serif",12,"#000000","#C8A468","#D1AA71","#000000","center","middle",1,0,1000,-5,7,true,true,true,0,false,false);
mm_menu_1122110118_0.addMenuItem("specials","location='http://www.frennphotography.com/family/family_specials.html'");
mm_menu_1122110118_0.addMenuItem("portrait&nbsp;sessions","location='http://www.frennphotography.com/family/portrait_sessions.htm'");
mm_menu_1122110118_0.addMenuItem("clothing&nbsp;tips","location='http://www.frennphotography.com/family/clothing_tips.htm'");
mm_menu_1122110118_0.addMenuItem("faqs","location='http://www.frennphotography.com/family/faqs.htm'");
mm_menu_1122110118_0.addMenuItem("our&nbsp;guarantee","location='http://www.frennphotography.com/guarantee.htm'");
mm_menu_1122110118_0.hideOnMouseOut=true;
mm_menu_1122110118_0.bgColor='#555555';
mm_menu_1122110118_0.menuBorder=1;
mm_menu_1122110118_0.menuLiteBgColor='#FFFFFF';
mm_menu_1122110118_0.menuBorderBgColor='#CCCCCC';
window.mm_menu_1122110325_0 = new Menu("root",153,18,"Arial, Helvetica, sans-serif",12,"#000000","#C8A468","#D1AA71","#000000","center","middle",3,0,1000,-5,7,true,true,true,0,false,false);
mm_menu_1122110325_0.addMenuItem("speciality&nbsp;items","location='http://www.frennphotography.com/speciality_items.htm'");
mm_menu_1122110325_0.addMenuItem("specials","location='http://www.frennphotography.com/seniors/senior_specials.html'");
mm_menu_1122110325_0.addMenuItem("price&nbsp;and&nbsp;packages","location='http://www.frennphotography.com/seniors/price_packages.htm'");
mm_menu_1122110325_0.addMenuItem("senior&nbsp;web&nbsp;pages","location='http://www.frennphotography.com/seniors/senior_pages.htm'");
mm_menu_1122110325_0.addMenuItem("clothing&nbsp;tips","location='http://www.frennphotography.com/seniors/clothing_tips.htm'");
mm_menu_1122110325_0.addMenuItem("faqs","location='http://www.frennphotography.com/seniors/faqs.htm'");
mm_menu_1122110325_0.addMenuItem("our&nbsp;guarantee","location='http://www.frennphotography.com/guarantee.htm'");
mm_menu_1122110325_0.hideOnMouseOut=true;
mm_menu_1122110325_0.bgColor='#555555';
mm_menu_1122110325_0.menuBorder=1;
mm_menu_1122110325_0.menuLiteBgColor='#FFFFFF';
mm_menu_1122110325_0.menuBorderBgColor='#CCCCCC';
window.mm_menu_1122110721_0 = new Menu("root",101,17,"Arial, Helvetica, sans-serif",12,"#000000","#C8A468","#D1AA71","#000000","center","middle",1,0,1000,-5,7,true,true,true,0,false,false);
mm_menu_1122110721_0.addMenuItem("price","location='http://www.frennphotography.com/business/price.htm'");
mm_menu_1122110721_0.addMenuItem("clothing&nbsp;tips","location='http://www.frennphotography.com/business/clothing_tips.htm'");
mm_menu_1122110721_0.hideOnMouseOut=true;
mm_menu_1122110721_0.bgColor='#555555';
mm_menu_1122110721_0.menuBorder=1;
mm_menu_1122110721_0.menuLiteBgColor='#FFFFFF';
mm_menu_1122110721_0.menuBorderBgColor='#CCCCCC';
mm_menu_1122110721_0.writeMenus();
} // mmLoadMenus()
//-->
</script>
<script language="JavaScript" src="../mm_menu.js"></script>
</head>

<body>

<script language="JavaScript1.2">mmLoadMenus();</script>
<div id="header">
<div align="center"><img src="../images/banner.gif" alt="gilbert frenn photography" width="860" height="150" /></div>
</div>
<table width="991" height="255" border="0">
<tr>
<td width="78" valign="top"><div align="right"><img src="../images/navi.gif" width="30" height="400" /> </div></td>
<td width="93" align="left" valign="top" id="navitext"><p><a href="../index.htm">Home</a></p>
<p><a href="../children/index.htm" name="link9" id="link1" onmouseover="MM_showMenu(window.mm_menu_1122105450_0,75,0,null, 'link9')" onmouseout="MM_startTimeout();">Children</a></p>
<p><a href="../family/index.htm" name="link8" id="link3" onmouseover="MM_showMenu(window.mm_menu_1122110118_0,62,0,null, 'link8')" onmouseout="MM_startTimeout();">Family</a></p>
<p><a href="../seniors/index.htm" name="link5" id="link4" onmouseover="MM_showMenu(window.mm_menu_1122110325_0,65,0,null, 'link5')" onmouseout="MM_startTimeout();">Seniors</a></p>
<p><a href="../business/index.htm" name="link6" id="link7" onmouseover="MM_showMenu(window.mm_menu_1122110721_0,77,0,null, 'link6')" onmouseout="MM_startTimeout();">Business</a></p>
<p><a href="../aboutus/index.htm">About Us</a></p>
<p><a href="../contactus/index.htm">Contact Us</a></p>
<p><a href="../location/index.htm">Location</a> </p></td>
<td width="793" valign="top"><form id="emaiForm" name="emaiForm" method="post" action="sendmail.asp">
<table width="793" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="75" class="rightAlign">Name:</td>
<td width="718"><input name="Name" type="text" id="Name" /></td>
</tr>
<tr>
<td class="rightAlign">email:</td>
<td><input name="email" type="text" id="email" /></td>
</tr>
<tr>
<td class="rightAlign">Message:</td>
<td><textarea name="info" cols="50" rows="5" id="info"></textarea></td>
</tr>
<tr>
<td class="rightAlign">Interests:</td>
<td><input name="Interests" type="checkbox" id="Interests" value="Childrens Portraits" />
Childrens Portraits&nbsp;
<input name="Interests" type="checkbox" id="Interests" value="Family Portraits" />
Family Portraits&nbsp; <input name="Interests" type="checkbox" id="Interests" value="Senior Portraits" />
Senior Portraits&nbsp; <input name="Interests" type="checkbox" id="Interests" value="Business Portraits" />
Business Portraits </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input name="recipient" type="hidden" id="recipient" value="spiderwoman1959@yahoo.com" />
<input name="Submit" type="submit" onclick="MM_validateForm('Name','','R','Email','','RisEmail ');return document.MM_returnValue" value="Email Me" />
<input name="Reset" type="reset" id="Reset" value="Reset" /> </td>
</tr>
</table>
</form></td>
<td width="9" align="left" valign="top"><h3 align="center" >&nbsp;</h3>
<h3 align="center" class="style2">&nbsp;</h3> </td>
</tr>
</table>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>

edbr
04-18-2008, 02:59 AM
your form looks ok so the problem is perhaps in the send ail handler that it is not collecting the values posted

gwolfe7
04-18-2008, 04:30 AM
Any suggestions on reviewing the mail handler???

edbr
04-18-2008, 04:56 AM
not without seeing it. I am guessing it is collecting the text area you mentioned and sending it to the addres syou have as a hidden field.
did you have to declare any variables in the handler?, is it a generic mail handler or custom made?

gwolfe7
04-19-2008, 12:25 AM
How can I send you the mail handler information?

Would it be helpful to view the .ASP page?

edbr
04-19-2008, 01:13 AM
post the code of sendmail.asp , take out any connection details for security though . what is the URL of this site?

gwolfe7
04-19-2008, 02:48 AM
Site name is www.frennphotography.com (http://www.frennphotography.com). Once there navigate down the page to the contact link. This is the page I'm having problems with. Listed below is the code, sendmail.asp


<!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>
<!-- contact us main page -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>frenn photography creative portraits for family children high school seniors and business portraits</title>
<link href="../styles.css" rel="stylesheet" type="text/css" />
<script language="JavaScript">
<!--
function mmLoadMenus() {
if (window.mm_menu_1122105450_0) return;
window.mm_menu_1122105450_0 = new Menu("root",175,18,"Arial, Helvetica, sans-serif",12,"#000000","#C8A468","#D1AA71","#000000","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
mm_menu_1122105450_0.addMenuItem("speciality&nbsp;items","location='speciality_items.htm'");
mm_menu_1122105450_0.addMenuItem("specials","location='../children/children_specials.htm'");
mm_menu_1122105450_0.addMenuItem("price&nbsp;and&nbsp;packages","location='price_packages.htm'");
mm_menu_1122105450_0.addMenuItem("clothing&nbsp;tips","location='clothing_tips.htm'");
mm_menu_1122105450_0.addMenuItem("faqs","location='faqs.htm'");
mm_menu_1122105450_0.addMenuItem("our&nbsp;guarantee","location='guarantee.htm'");
mm_menu_1122105450_0.hideOnMouseOut=true;
mm_menu_1122105450_0.bgColor='#555555';
mm_menu_1122105450_0.menuBorder=1;
mm_menu_1122105450_0.menuLiteBgColor='#FFFFFF';
mm_menu_1122105450_0.menuBorderBgColor='#777777';
window.mm_menu_1122110118_0 = new Menu("root",154,18,"Arial, Helvetica, sans-serif",12,"#000000","#C8A468","#D1AA71","#000000","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
mm_menu_1122110118_0.addMenuItem("specials","location='../family/family_specials.html'");
mm_menu_1122110118_0.addMenuItem("portrait&nbsp;sessions","location='portrait_sessions.htm'");
mm_menu_1122110118_0.addMenuItem("clothing&nbsp;tips","location='clothing_tips.htm'");
mm_menu_1122110118_0.addMenuItem("faqs","location='faqs.htm'");
mm_menu_1122110118_0.addMenuItem("our&nbsp;guarantee","location='guarantee.htm'");
mm_menu_1122110118_0.hideOnMouseOut=true;
mm_menu_1122110118_0.bgColor='#555555';
mm_menu_1122110118_0.menuBorder=1;
mm_menu_1122110118_0.menuLiteBgColor='#FFFFFF';
mm_menu_1122110118_0.menuBorderBgColor='#777777';
window.mm_menu_1122110325_0 = new Menu("root",175,18,"Arial, Helvetica, sans-serif",12,"#000000","#C8A468","#D1AA71","#000000","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
mm_menu_1122110325_0.addMenuItem("speciality&nbsp;items","location='speciality_items.htm'");
mm_menu_1122110325_0.addMenuItem("specials","location='../seniors/senior_specials.html'");
mm_menu_1122110325_0.addMenuItem("price&nbsp;and&nbsp;packages","location='price_packages.htm'");
mm_menu_1122110325_0.addMenuItem("senior&nbsp;web&nbsp;pages","location='senior_pages.htm'");
mm_menu_1122110325_0.addMenuItem("clothing&nbsp;tips","location='clothing_tips.htm'");
mm_menu_1122110325_0.addMenuItem("faqs","location='faqs.htm'");
mm_menu_1122110325_0.addMenuItem("our&nbsp;guarantee","location='guarantee.htm'");
mm_menu_1122110325_0.hideOnMouseOut=true;
mm_menu_1122110325_0.bgColor='#555555';
mm_menu_1122110325_0.menuBorder=1;
mm_menu_1122110325_0.menuLiteBgColor='#FFFFFF';
mm_menu_1122110325_0.menuBorderBgColor='#777777';
window.mm_menu_1122110721_0 = new Menu("root",95,18,"Arial, Helvetica, sans-serif",12,"#000000","#C8A468","#D1AA71","#000000","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
mm_menu_1122110721_0.addMenuItem("price","location='price.htm'");
mm_menu_1122110721_0.addMenuItem("clothing&nbsp;tips","location='clothing_tips.htm'");
mm_menu_1122110721_0.hideOnMouseOut=true;
mm_menu_1122110721_0.bgColor='#555555';
mm_menu_1122110721_0.menuBorder=1;
mm_menu_1122110721_0.menuLiteBgColor='#FFFFFF';
mm_menu_1122110721_0.menuBorderBgColor='#777777';

mm_menu_1122110721_0.writeMenus();
} // mmLoadMenus()
//-->
</script>
<script language="JavaScript" src="../mm_menu.js"></script>
</head>

<body>

<script language="JavaScript1.2">mmLoadMenus();</script>
<div id="header">
<div align="center"><img src="../images/banner.gif" alt="gilbert frenn photography" width="860" height="150" /></div>
</div>
<table width="991" height="255" border="0">
<tr>
<td width="30" valign="top"><img src="../images/navi.gif" width="30" height="400" /> </td>
<td width="160" align="left" valign="top" id="navitext"><p><a href="../index.htm">Home</a></p>
<p><a href="../children/index.htm" name="link8" id="link1" onmouseover="MM_showMenu(window.mm_menu_1122105450_0,51,0,null, 'link8')" onmouseout="MM_startTimeout();">Children</a></p>
<p><a href="../family/index.htm" name="link5" id="link3" onmouseover="MM_showMenu(window.mm_menu_1122110118_0,40,0,null, 'link5')" onmouseout="MM_startTimeout();">Family</a></p>
<p><a href="../seniors/index.htm" name="link2" id="link4" onmouseover="MM_showMenu(window.mm_menu_1122110325_0,45,0,null, 'link2')" onmouseout="MM_startTimeout();">Seniors</a></p>
<p><a href="../business/index.htm" name="link7" id="link7" onmouseover="MM_showMenu(window.mm_menu_1122110721_0,52,0,null, 'link7')" onmouseout="MM_startTimeout();">Business</a></p>
<p><a href="../aboutus/index.htm">About Us</a></p>
<p><a href="../contactus/index.htm">Contact Us</a></p>
<p><a href="../location/index.htm">Location</a> </p></td>
<td width="793" valign="top"><%
' Get the data from the form that submitted to this page
senderName = Request.Form("Name")
senderEmail = Request.Form("Email")
subject = "Email Sent from Web Site"
recipient = Request.Form("recipient")
body = Request.Form("Body") &vbcrlf &vbcrlf
body = body & "Gender: " & Request.Form("Gender") &vbcrlf
body = body & "Interests: " & Request.Form("Interests") &vbcrlf
body = body & "Race: " & Request.Form("Race") &vbcrlf
body = body & "Password: " & Request.Form("Password") &vbcrlf
body = body & "Name: " & Request.Form("Name") & " " & Request.Form("Email")

' Create the JMail message Object
set msg = Server.CreateOBject( "JMail.Message" )

' Set logging to true to ease any potential debugging
msg.Logging = true

' Set silent to true as we wish to handle our errors ourself
msg.silent = true

' Enter the sender data from the variables into the JMail object
msg.From = senderEmail
msg.FromName = senderName

' Note that because addRecipient is a method and not
' a property, we do not use an equals ( = ) sign
msg.AddRecipient recipient

' The subject of the message
msg.Subject = subject

' And the body
msg.body = body

' Now send the message, using the indicated mailserver
' Or, display the error message if not sent
if not msg.Send("localhost" ) then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "Message sent succesfully!"
end if
' And we're done! the message has been sent.
%></td>
<td width="9" align="left" valign="top"><h3 align="center" >&nbsp;</h3>
<h3 align="center" class="style2">&nbsp;</h3> </td>
</tr>
</table>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>

mangofreak
04-19-2008, 02:56 AM
ok. Here is one idea.
create another page called emailProcess.asp or whatever. Then change the Action on your form to the name of the new file. Then paste the following code between the body tags of your new page, to see what is that page receiving from the form.


<%
FOR EACH Form_Parameter IN Request.Form
Response.Write(Form_Parameter & "&nbsp;" & "=" & "&nbsp;")'this are the field names
Response.Write(Request.Form(Form_Parameter) & "<BR>")
NEXT
%>


Once you have that clear. We can check what your sendmail.asp page is doing. We also need the code for that.

gwolfe7
05-02-2008, 03:00 AM
Hi Mangofreak,

Thanks for your suggestion although I didn't write the code, I'm just trying to help someone fix this problem.

Not sure what to do at this point.

edbr
05-02-2008, 03:20 AM
did you understand what mangofreak suggested?

june yap
05-23-2008, 09:05 AM
I am new in Dreamweaver, can I know how to post data to a form for exp employee number and then check employee number in database and get employee name. The database is connect to server and not in c drive. TQ