PDA

View Full Version : There will never be a dumber question on this forum!



abigailhamilton
December 5th, 2008, 03:38 PM
I have the world's simplest form (to collect email address from willing site visitors) and I cannot make it work. Can you help?!

Many thanks in advance, humbly.



<?php
$email = $HTTP_POST_VARS[Email];
$mailto = "info@jillbucy.com, jillbucy@msn.com, jill@ah.candyhog.com";
$mailsubj = "Mailing list request";
$mailhead = "From: $email\n";
$err = 0;
if ( strlen($name)<3 || strlen($numberofguests)<1 || strlen($email)<5) {
$err=1;
}
if (!$err) {
reset ($HTTP_POST_VARS);
$mailbody = "A visitor would like to be added to the email list fr invites and newsletters:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
/// if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
mail($mailto, $mailsubj, $mailbody, $mailhead);
$email = '';
}
?>
<!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"><!-- InstanceBegin template="/Templates/Main.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Photos of Jill Bucy Skincare Salon in Seattle</title><meta name="description" content="Even when you're far away you can drink in the sumptuous, relaxing atmosphere at Jill Bucy Skincare salon — just drop in to see photos!" />
<script type="text/javascript">
function onSilverlightError(sender, args) {

var appSource = "";
if (sender != null && sender != 0) {
appSource = sender.getHost().Source;
}
var errorType = args.ErrorType;
var iErrorCode = args.ErrorCode;

var errMsg = "Unhandled Error in Silverlight 2 Application " + appSource + "\n" ;
errMsg += "Code: "+ iErrorCode + " \n";
errMsg += "Category: " + errorType + " \n";
errMsg += "Message: " + args.ErrorMessage + " \n";
if (errorType == "ParserError")
{
errMsg += "File: " + args.xamlFile + " \n";
errMsg += "Line: " + args.lineNumber + " \n";
errMsg += "Position: " + args.charPosition + " \n";
}
else if (errorType == "RuntimeError")
{
if (args.lineNumber != 0)
{
errMsg += "Line: " + args.lineNumber + " \n";
errMsg += "Position: " + args.charPosition + " \n";
}
errMsg += "MethodName: " + args.methodName + " \n";
}
throw new Error(errMsg);
}
</script>
<!-- InstanceEndEditable -->
<script type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!--
body {
background-color: #e6e4d7;
}
-->
</style>
<link href="jillbucy.css" rel="stylesheet" type="text/css" />
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<style type="text/css">
<!--
a:link {
color: #666666;
}
a:visited {
color: #666666;
}
.style4 {color: #CC0000}
-->
</style></head>
<body onload="MM_preloadImages('images/jill-bucy-skincare-over_09.jpg','images/jill-bucy-skincare-over_10.jpg','images/jill-bucy-skincare-over_11.jpg','images/jill-bucy-skincare-over_12.jpg','images/jill-bucy-skincare-over_13.jpg','images/jill-bucy-skincare-over_14.jpg','images/jill-over_05.jpg','images/jill-over_06.jpg','images/jill-over_07.jpg','images/jill-over_08.jpg','images/jill-over_09.jpg','images/jill-over_10.jpg')">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0" bgcolor="#FFCC00">
<tr>
<td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="bottom"><a href="http://best.king5.com/jill-bucy-skincare/biz/123660" target="_blank"></a>
<table width="382" border="0" cellpadding="12" style="float:right;">
<tr>
<td height="112"><p class="body">&nbsp;</p>
<form method="post" action="">
<p class="body"><span class="style4">Receive Jill Bucy Skincare event invitations &amp; news</span><br />
<span class="input-body">
<input name="Email" type="text" id="Email" size="30" maxlength="80" value="Simply enter your e-mail address" style="margin: 0pt 4px 0px 0px;" />
</span>
<input type="submit" name="Submit" value="Submit" style="margin: 4pt 0px 0px 4px;" />
</form>
</p></td>
</tr>
</table>
<a href="default.aspx"><img src="images/jill_01.jpg" alt="Jill Bucy Skincare Seattle" width="407" height="181" border="0" /></a></td>
</tr>
<tr>
<td background="images/jill-nav-bg.jpg"><table width="770" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="831"><a href="default.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','images/jill-over_03.jpg',1)"><img src="images/jill_03.jpg" alt="Jill Bucy Skincare Home Page" name="home" width="62" height="32" border="0" id="Home" /></a><a href="seattle-french-skincare.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('skincareservices','','images/jill-over_04.jpg',1)"><img src="images/jill_04.jpg" alt="Seattle Skincare Services" name="skincare-services" width="78" height="32" border="0" id="skincareservices" /></a><a href="biologique-recherche-products.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('products','','images/jill-over_05.jpg',1)"><img src="images/jill_05.jpg" alt="Biologique Skincare Products" name="products" width="78" height="32" border="0" id="products" /></a><a href="about-jill-bucy-skincare.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('about-jill-bucy','','images/jill-over_06.jpg',1)"><img src="images/jill_06.jpg" alt="About Jill Bucy Skincare Seattle" name="about-jill-bucy" width="86" height="32" border="0" id="about-jill-bucy" /></a><a href="jill-bucy-skincare-location.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('location-contact','','images/jill-over_07.jpg',1)"><img src="images/jill_07.jpg" alt="Jill Bucy Skincare location and Contact Information " name="location-contact" width="153" height="32" border="0" id="location-contact" /></a><a href="jill-bucy-skincare-press.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('press','','images/jill-over_08.jpg',1)"><img src="images/jill_08.jpg" alt="Jill Bucy Skincare Press" name="press" width="164" height="32" border="0" id="press" /></a><a href="photos-jill-bucy-skincare.html" target="_blank" onmouseover="MM_swapImage('photo gallery','','images/jill-over_09.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="images/jill_09.jpg" alt="Photos Jill Bucy Seattle Skincare" name="photo gallery" width="93" height="32" border="0" id="photo gallery" /></a><a href="http://jillbucy.typepad.com/" target="_blank" onmouseover="MM_swapImage('blog','','images/jill-over_10.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="images/jill_10.jpg" alt="Skincare Blog" name="blog" width="55" height="32" border="0" id="blog" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="20" background="images/jill_12.jpg"><img src="images/jill_12.jpg" alt="Seattle NaturalSkin Care" width="769" height="20" /></td>
</tr>
<tr>
<td><!-- InstanceBeginEditable name="content" -->
<a href="http://best.king5.com/jill-bucy-skincare/biz/123660" target="_blank"><img src="images/best-of-northwest.png" alt="Best Facial Seattle" width="133" height="148" border="0" style="float:right; margin: 20px 0px 0px 0px;" /></a>
<form>
<div id='errorLocation' style="font-size: small;color: Gray;"></div>
<div id="silverlightControlHost">
<object data="data:application/x-silverlight," type="application/x-silverlight-2" width="724" height="413">
<param name="source" value="JillPhotoGallery.xap"/>
<param name="onerror" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="2.0.31005.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/> </a>
</object>
<a href="http://best.king5.com/jill-bucy-skincare/biz/123660" target="_blank"></a></div>
</form>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
<p align="center" class="body"><a href="mailto:info@jillbucy.com (info@jillbucy.com)" class="body">E-mail us</a> or call 206-283-9295 &bull; <a href="sitemap.html">Sitemap</a> </p>
<p class="copyright">&copy; 2008 Jill Bucy Skincare </p>
<!-- BEGIN TRACKING CODE -->
<script type="text/javascript" language="JavaScript">
var FCProAccountId = "dfb941ad-fa44-4ed0-8efe-75729ce925bd";
var ServerName = "jillbucy-com.sitereports.officelive.com";
</script>
<script type="text/javascript" language="JavaScript" src="http://jillbucy-com.sitereports.officelive.com/js/restats_static.js">
</script>
<noscript>
<img src="http://jillbucy-com.sitereports.officelive.com/FCPISAPI/ISAPIExtn.dll/i/dfb941ad-fa44-4ed0-8efe-75729ce925bd/0" />
</noscript>
<!-- END TRACKING CODE -->

</body>
<!-- InstanceEnd --></html>

Jeff Wheeler
December 5th, 2008, 05:14 PM
Hardly the simplest question on this forum.

Can you be a bit more specific with your problem? What exactly doesn't work?

abigailhamilton
December 5th, 2008, 05:20 PM
Hardly the simplest question on this forum.

Can you be a bit more specific with your problem? What exactly doesn't work?


The form is live at jillbucy.com. You can enter your email address into the form field, but the email never is sent to/arrives at the designated email addresses. It would be really nice on top of functioning if a small thank you message appeared after you click submit. Does that help? Let me know if there's more info you need. I appreciate your help a lot!

A

Sage_of_Fire
December 6th, 2008, 12:30 PM
Can your server send mail? A whole lot of hosting providers don't allow it, and depending on how they block it, you could get a silent failure. If you don't know, just test the mail function independent of any script to see if you get the mail. Alternatively, you could call the php_info() function to see if mail() is on your blocked functions list.

abigailhamilton
December 8th, 2008, 10:47 AM
A Twitter pal clued me in. It's that the site is hosted by Office Live, and they don't support php. I'll need to code the form in asp. Anyone know how to do that?! :cross-eye



Can your server send mail? A whole lot of hosting providers don't allow it, and depending on how they block it, you could get a silent failure. If you don't know, just test the mail function independent of any script to see if you get the mail. Alternatively, you could call the php_info() function to see if mail() is on your blocked functions list.

Sage_of_Fire
December 8th, 2008, 05:20 PM
I know that you can control Microsoft's .NET framework with php, but I have no idea how. Most people who are experienced with .NET have good jobs and very little time to spend on this site, so I'm not sure if you'll find any answers here.

You should try starting a thread (that mentions ASP .NET in the title) in the Server-Side languages board about your problem, to see if we have any .NET experts willing to help. Good luck!

abigailhamilton
December 8th, 2008, 05:25 PM
Thanks for the ideas and the info. It seems ironic to me (and I'm sure I'm alone ;-) that Office LIve which is made for non-techy people has arcane support/doesn't support parameters. Onward! And again thanks!:look:


I know that you can control Microsoft's .NET framework with php, but I have no idea how. Most people who are experienced with .NET have good jobs and very little time to spend on this site, so I'm not sure if you'll find any answers here.

You should try starting a thread (that mentions ASP .NET in the title) in the Server-Side languages board about your problem, to see if we have any .NET experts willing to help. Good luck!