Jump to content

add cc option to php form


logicsound

Recommended Posts

in the form itself, add in a check box to add carbon copy

 

then in your headers you can use all of these things:

 

$headers = "From: myplace@here.com\r\n";

$headers .= "Reply-To: myplace2@here.com\r\n";

$headers .= "Return-Path: myplace@here.com\r\n";

$headers .= "CC: sombodyelse@noplace.com\r\n";

$headers .= "BCC: hidden@special.com\r\n";

 

Hope it helps out.

 

edit:

 

remember that you get your data from the form using $_POST so to extract the email address you get that through $email = $_POST['EMAIL'];

 

then to add the headers in your case you would do:

 

$mailhead .="CC: ".$email."\r\n";

 

but remember to add the \r\n to your other mail head or it wont really work.

Link to comment
Share on other sites

ok but what code do I need to give thee cc checkbox ? so it links to send a cc email. 

 

also in your code example you have $headers .= "CC: sombodyelse@noplace.com\r\n";  but this email address is going to change depending on what the user puts in there email field so what is the php code so I can pull the data from my ID email in the form

 

 

Thanks!!

Link to comment
Share on other sites

the CC checkbox would be just regular HTML for a check box.. nothing special.

 

I edited my other post for you...  you only need the checkbox if you want to give the end user the option of having it sent to them as well otherwise you dont need it.

 

 

Link to comment
Share on other sites

hey i was there once too...

 

these are the 2 lines you'll change..  one is just a change, one is an addition... 

 

$mailhead = "From: LOI\r\n";

$mailhead = "CC: ".$_POST['EMAIL']."\r\n";

 

simple eh?

Link to comment
Share on other sites

btw, im not setting any form tags with an action?

 

The best practices would to have something like this:

 

<form name="myform" action="sendmail.php">

-- add tables and input boxes here --

</form>

 

then in your sendmail.php doing something like this:

 

<?php
  $to = me@mycompany.com
  $from = $_POST['email'];
  $sub = "LOI";
  $mailhead .= "FROM: LOI\r\n";
  $mailhead .= "CC: ".$_POST['EMAIL']."\r\n";

  
$mailbody = "Values submitted from LOI:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) 
{
$mailbody .= "$key : $val\n"; 
}
mail($to, $subj, $mailbody, $mailhead);
?>

Link to comment
Share on other sites

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<!-- Design / code / css by Nadia  www.perrelink.com.au -->

<html>

<head>

<title>The Leon Levine Foundation</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script src="SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script>

<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>

<script language="JavaScript" type="text/JavaScript">

<!--

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[n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}

 

function MM_showHideLayers() { //v6.0

  var i,p,v,obj,args=MM_showHideLayers.arguments;

  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args))!=null) { v=args[i+2];

    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }

    obj.visibility=v; }

}

//-->

</script>

<script language="JavaScript" type="text/JavaScript">

<!--

 

function MM_reloadPage(init) {  //reloads the window if Nav4 resized

  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

MM_reloadPage(true);

 

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.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

}

//-->

</script>

<link href="css/global.css" rel="stylesheet" type="text/css">

<style type="text/css">

<!--

.style2 {font-size: 24px}

-->

</style>

<link href="SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css">

<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">

<style type="text/css">

<!--

.style3 {

color: #FFFFFF

}

.style13 {color: #666666}

-->

</style>

</head>

<body>

<!-- Wrapper div seeing stylesheet for styling  -->

<div id="wrapper">

<!-- Dropdown Div on button 3- see stylesheet for styling and positioning-->

<div id="dropdown3">

<table width="150" border="0" cellpadding="0" cellspacing="0" class="menu">

<tr>

<td><a href="grants.html#health">Healthcare </a></td>

</tr>

<tr>

<td><a href="grants.html#education">Education</a></td>

</tr>

<tr>

<td><a href="grants.html#jewish">Jewish Religon</a></td>

</tr>

<tr>

<td><a href="grants.html#human">Human Services</a></td>

</tr>

<tr>

<td><a href="grants.html#Emerging">Emerging Issues</a></td>

</tr>

</table>

</div>

<!-- end of dropdown 3 -->

<!-- Dropdown 4 div - see stylesheet for styling and positioning -->

<div id="dropdown4">

<table width="150" border="0" cellpadding="0" cellspacing="0" class="menu">

<tr>

<td><a href="#">Guidelines</a></td>

</tr>

<tr>

<td><a href="#">Eligibility</a></td>

</tr>

<tr>

<td><a href="faq.html">Faq's</a></td>

</tr>

</table>

</div>

<!-- End of Dropdown 4 -->

<!-- This is the closer div - mousing over this closes the dropdowns -->

<div id="closer"><a href="javascript:;" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide','closer','','hide')"><img src="graphics/shim.gif" alt="" width="700" height="190" border="0"></a> </div>

<!-- end of closer div -->

</div>

<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<!-- topleftside image -->

<td valign="top"><!-- company name table -->

<table width="750" border="0" cellpadding="0" cellspacing="0" id="logotbl">

<tr>

<!-- here we have set the show-hide behaviour to the header images, so that if someone mouses over these images the dropdown menus will hide - all explained in the help docs -->

<td><a href="index.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide','closer','','hide')"><img src="graphics/logo.gif" alt="" width="750" height="84" border="0" title=""></a></td>

</tr>

</table>

<!-- end logo table -->

<!-- navbar table -->

<table width="750" border="0" cellpadding="0" cellspacing="0" id="navbar">

<tr>

<td width="120" height="25"><a href="aboutus.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide','closer','','hide')"><img src="graphics/buttons/button1.gif" alt="" name="button1" width="120" height="25" border="0" id="button1" title=""></a></td>

<td><a href="mission.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide')">

<img src="graphics/buttons/button2.gif" alt="" name="button2" width="120" height="25" border="0" id="button2" title=""></a></td>

<td><a href="grants.html" onMouseOver="MM_showHideLayers('dropdown3','','show','dropdown4','','hide','closer','','show')">

<img src="graphics/buttons/button3.gif" alt="" name="button3" width="120" height="25" border="0" id="button3" title=""></a></td>

<td><a href="apply.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','show','closer','','show')">

<img src="graphics/buttons/button4.gif" alt="" name="button4" width="120" height="25" border="0" id="button4" title=""></a></td>

<td><a href="news.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide')">

<img src="graphics/buttons/button5.gif" alt="" name="button5" width="120" height="25" border="0" id="button5" title=""></a></td>

<td><a href="contactus.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide')">

<img src="graphics/buttons/button6.gif" alt="" name="button6" width="120" height="25" border="0" id="button6" title=""></a></td>

<td width="100%"> </td>

</tr>

</table></td>

<!-- outer table image topright side -->

</tr>

<tr>

<!-- outer table middle graphic -->

<td valign="top"><!--begin slogan content area - lady and company slogan area-->

<table border="0" cellpadding="0" cellspacing="0" id="slogansection">

<tr>

<td><img src="graphics/midsection.jpg" alt="" width="750" height="212" border="0"></td>

</tr>

</table></td>

<!-- outer table image rightside middle  -->

</tr>

<tr valign="top">

<!-- end of mid slogan area -->

<!-- start of main content area -->

<td height="546"><table width="750" border="0" cellpadding="0" cellspacing="0" id="contenttable">

<tr>

<td width="750" valign="top"><h1 align="center"><strong><em> Letter of Inquiry</em></strong></h1>

  <p> </p>

<form action="letter.php" method="post" name="letterofinquiry" id="letterofinquiry">

  <table width="700" border="0">

   

    <tr>

      <td align="right" bgcolor="#660000"><span class="style3">Organization Legal Name</span></td>

      <td bgcolor="#CCCCCC"><span id="sprytextfield1">

        <input name="ORGANIZATION" type="text" id="ORGANIZATION" size="50">

        <span class="textfieldRequiredMsg">A value is required.</span></span></td>

    </tr>

    <tr>

      <td align="right" bgcolor="#660000"><span class="style3">Name of Program Requested</span></td>

      <td bgcolor="#CCCCCC"><span id="sprytextfield2">

        <input name="PROJECT" type="text" id="PROJECT" size="50">

        <span class="textfieldRequiredMsg">A value is required.</span></span></td>

    </tr>

    <tr>

      <td align="right" bgcolor="#660000"><span class="style3">Contact Name</span></td>

      <td bgcolor="#CCCCCC"><span id="sprytextfield3">

        <input name="NAME" type="text" id="NAME" size="50">

        <span class="textfieldRequiredMsg">A value is required.</span></span></td>

    </tr>

    <tr>

      <td align="right" bgcolor="#660000"><span class="style3">Contact Address</span></td>

      <td bgcolor="#CCCCCC"><span id="sprytextarea5">

        <textarea name="ADDRESS" id="ADDRESS" cols="45" rows="5"></textarea>

        <span class="textareaRequiredMsg">A value is required.</span></span></td>

    </tr>

    <tr>

      <td align="right" bgcolor="#660000"><span class="style3">Contact Email</span></td>

      <td bgcolor="#CCCCCC"><span id="sprytextfield5">

      <input name="EMAIL" type="text" id="EMAIL">

      <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>

    </tr>

    <tr>

      <td align="right" bgcolor="#660000"><span class="style3">Contact Phone </span></td>

      <td bgcolor="#CCCCCC"><span id="sprytextfield6">

      <input name="PHONE" type="text" id="PHONE" size="12">

      <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>

    </tr>

    <tr>

      <td align="right" valign="top" bgcolor="#660000"><span class="style3">Please choose all that apply</span></td>

      <td bgcolor="#CCCCCC"><p><strong>The Leon Levine Foundation  seeks to improve and advance the human condition in four major areas: Religion,  Education, Healthcare and Human Services.   It therefore exists to support individuals and institutions seeking to  accomplish the following:</strong> </p>

        <p>

          <input name="HEALTHCARE" type="checkbox" id="HEALTHCARE" value="Supporting the physically, mentally or emotionally ill through medical assistance and scientific research">

          <strong>Supporting the physically, mentally or  emotionally ill through medical assistance and scientific research.</strong></p>

        <p><strong>

          <input name="EDUCATION" type="checkbox" id="EDUCATION" value="Pursuing academic excellence and providing access for disadvantaged and deserving individuals;">

        </strong><strong>Pursuing academic excellence and providing  access for disadvantaged and deserving individuals;</strong></p>

        <p>

          <input name="RELIGON" type="checkbox" id="RELIGON" value="Building Jewish identity and strengthening Jewish Communities locally and worldwide;">

          <strong>Building Jewish identity and  strengthening Jewish Communities locally and worldwide;</strong></p>

        <p>

          <input type="checkbox" name="HUMAN SERVICES" id="HUMAN SERVICES">

          <strong>Eliminating homelessness, alleviating personal  crisis, supporting cultural activities and improving the lives of families, children  and the elderly.</strong></p>

        <p>

          <input name="OTHER" type="checkbox" id="OTHER" value="Responding to other emerging issues which could have a significant impact on society.">

          <strong>Responding to other emerging issues which could  have a significant impact on society.</strong></p></td>

    </tr>

    <tr>

      <td align="right" bgcolor="#660000"><span class="style3">Describe how your organization or program fits into the mission of TLLF(350 character limit)</span></td>

      <td bgcolor="#CCCCCC"><span id="sprytextarea1">

      <textarea name="MISSION" id="MISSION" cols="45" rows="10"></textarea>

      <span id="countsprytextarea1"> </span>      <span class="textareaRequiredMsg">A value is required.</span><span class="textareaMaxCharsMsg">Exceeded maximum number of characters.</span></span></td>

    </tr>

    <tr>

      <td align="right" bgcolor="#660000"><span class="style3">Provide a summary of your organization and why it exists (1,000 character li<span class="style3">mit</span>)</span></td>

      <td bgcolor="#CCCCCC"><span id="sprytextarea2">

      <textarea name="SUMMARY" cols="45" rows="15" id="SUMMARY"></textarea>

      <span id="countsprytextarea2"> </span>      <span class="textareaRequiredMsg">A value is required.</span><span class="textareaMaxCharsMsg">Exceeded maximum number of characters.</span></span></td>

    </tr>

    <tr>

      <td align="right" bgcolor="#660000"><span class="style3">Describe the program for which you will request support, why the program is necessary and what impact is expected (1,000 character limit)</span></td>

      <td bgcolor="#CCCCCC"><span id="sprytextarea3">

      <textarea name="PROGRAM" cols="45" rows="15" id="PROGRAM"></textarea>

      <span id="countsprytextarea3"> </span>      <span class="textareaRequiredMsg">A value is required.</span><span class="textareaMaxCharsMsg">Exceeded maximum number of characters.</span></span></td>

    </tr>

    <tr>

      <td align="right" bgcolor="#660000"><span class="style3">Describe the financial challenges you face to achieve the above</span></td>

      <td bgcolor="#CCCCCC"><span id="sprytextarea4">

      <textarea name="NEED" cols="45" rows="10" id="NEED"></textarea>

      <span id="countsprytextarea4"> </span>      <span class="textareaRequiredMsg">A value is required.</span><span class="textareaMaxCharsMsg">Exceeded maximum number of characters.</span></span></td>

    </tr>

    <tr>

      <td align="right" bgcolor="#660000"> </td>

      <td bgcolor="#CCCCCC"><div align="left">

        <input type="submit" value="Submit">

      </div></td>

    </tr>

  </table>

</form>

<p> </p>

<p> </p>

<p> </p></td>

</tr>

</table>

  <span class="style2">

<!-- end of content area -->

<!-- begin text link area -->

  </span>

  <table width="100%" border="0" cellpadding="0" cellspacing="0" id="linkbar">

<tr>

<td align="center" class="style2"><p><a href="index.html">Home</a> |<a href="contactus.html"> Contact Us</a></p>

<p><span class="footertext">Leon Levine Foundation Copyright © 2009 Site design by</span> <a href="http://www.groupcci.com" class="style13">Group CCI</a></p>

<p> </p></td>

</tr>

</table></tr>

</table>

<script type="text/javascript">

<!--

var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");

var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");

var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");

var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "email");

var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6", "phone_number", {useCharacterMasking:true});

var sprytextarea2 = new Spry.Widget.ValidationTextarea("sprytextarea2", {maxChars:1000, counterType:"chars_remaining", counterId:"countsprytextarea2"});

var sprytextarea3 = new Spry.Widget.ValidationTextarea("sprytextarea3", {maxChars:1000, counterType:"chars_remaining", counterId:"countsprytextarea3"});

var sprytextarea4 = new Spry.Widget.ValidationTextarea("sprytextarea4", {maxChars:350, counterType:"chars_remaining", counterId:"countsprytextarea4"});

var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1", {maxChars:350, counterType:"chars_remaining", counterId:"countsprytextarea1"});

var sprytextarea5 = new Spry.Widget.ValidationTextarea("sprytextarea5");

//-->

</script>

</body>

</html>

 

Link to comment
Share on other sites

and this is the page it posts too

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>The Leon Levine Foundation</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="JavaScript" type="text/JavaScript">

<!--

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[n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}

 

function MM_showHideLayers() { //v6.0

  var i,p,v,obj,args=MM_showHideLayers.arguments;

  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args))!=null) { v=args[i+2];

    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }

    obj.visibility=v; }

}

//-->

</script>

<script language="JavaScript" type="text/JavaScript">

<!--

 

function MM_reloadPage(init) {  //reloads the window if Nav4 resized

  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

MM_reloadPage(true);

 

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.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

}

//-->

</script>

<link href="css/global.css" rel="stylesheet" type="text/css">

<style type="text/css">

<!--

.style2 {font-size: 24px}

.style7 {

font-size: 18px;

font-weight: bold;

font-style: italic;

}

.style10 {font-size: 14px; font-weight: bold; font-style: italic; }

.style11 {font-size: 14px}

.style12 {font-size: 16px; font-weight: bold; font-style: italic; }

-->

</style>

</head>

<body>

<!-- Wrapper div seeing stylesheet for styling  -->

<div id="wrapper">

<!-- Dropdown Div on button 3- see stylesheet for styling and positioning-->

<div id="dropdown3">

<table width="150" border="0" cellpadding="0" cellspacing="0" class="menu">

<tr>

<td><a href="grants.html#health">Healthcare </a></td>

</tr>

<tr>

<td><a href="grants.html#education">Education</a></td>

</tr>

<tr>

<td><a href="grants.html#jewish">Jewish Religon</a></td>

</tr>

<tr>

<td><a href="grants.html#human">Human Services</a></td>

</tr>

<tr>

<td><a href="grants.html#Emerging">Emerging Issues</a></td>

</tr>

</table>

</div>

<!-- end of dropdown 3 -->

<!-- Dropdown 4 div - see stylesheet for styling and positioning -->

<div id="dropdown4">

<table width="150" border="0" cellpadding="0" cellspacing="0" class="menu">

<tr>

<td><a href="apply.html#guidelines">Guidelines</a></td>

</tr>

<tr>

<td><a href="apply.html#eligibility">Eligibility</a></td>

</tr>

<tr>

<td><a href="faq.html">Faq's</a></td>

</tr>

</table>

</div>

<!-- End of Dropdown 4 -->

<!-- This is the closer div - mousing over this closes the dropdowns -->

<div id="closer"><a href="javascript:;" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide','closer','','hide')"><img src="graphics/shim.gif" alt="" width="700" height="190" border="0"></a> </div>

<!-- end of closer div -->

</div>

<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<!-- topleftside image -->

<td valign="top"><!-- company name table -->

<table width="750" border="0" cellpadding="0" cellspacing="0" id="logotbl">

<tr>

<!-- here we have set the show-hide behaviour to the header images, so that if someone mouses over these images the dropdown menus will hide - all explained in the help docs -->

<td><a href="index.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide','closer','','hide')"><img src="graphics/logo.gif" alt="" width="750" height="84" border="0" title=""></a></td>

</tr>

</table>

<!-- end logo table -->

<!-- navbar table -->

<table width="750" border="0" cellpadding="0" cellspacing="0" id="navbar">

<tr>

<td width="120" height="25"><a href="aboutus.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide','closer','','hide')"><img src="graphics/buttons/button1.gif" alt="" name="button1" width="120" height="25" border="0" id="button1" title=""></a></td>

<td><a href="mission.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide')">

<img src="graphics/buttons/button2.gif" alt="" name="button2" width="120" height="25" border="0" id="button2" title=""></a></td>

<td><a href="grants.html" onMouseOver="MM_showHideLayers('dropdown3','','show','dropdown4','','hide','closer','','show')">

<img src="graphics/buttons/button3.gif" alt="" name="button3" width="120" height="25" border="0" id="button3" title=""></a></td>

<td><a href="apply.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','show','closer','','show')">

<img src="graphics/buttons/button4.gif" alt="" name="button4" width="120" height="25" border="0" id="button4" title=""></a></td>

<td><a href="news.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide')">

<img src="graphics/buttons/button5.gif" alt="" name="button5" width="120" height="25" border="0" id="button5" title=""></a></td>

<td><a href="contactus.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide')">

<img src="graphics/buttons/button6.gif" alt="" name="button6" width="120" height="25" border="0" id="button6" title=""></a></td>

<td width="100%"> </td>

</tr>

</table></td>

<!-- outer table image topright side -->

</tr>

<tr>

<!-- outer table middle graphic -->

<td valign="top"><!--begin slogan content area - lady and company slogan area-->

<table border="0" cellpadding="0" cellspacing="0" id="slogansection">

<tr>

<td><img src="graphics/midsection.jpg" alt="" width="750" height="212" border="0"></td>

</tr>

</table></td>

<!-- outer table image rightside middle  -->

</tr>

<tr valign="top">

<!-- end of mid slogan area -->

<!-- start of main content area -->

<td height="546"><table width="750" border="0" cellpadding="0" cellspacing="0" id="contenttable">

<tr>

<td width="750" valign="top"><h1 align="center">

  <p>You may submit additional materials you feel may be helpful to the LOI to:</p>

  <p align="center">The Leon Levine Foundation<br>

    ATTN: Grants Administration<br>

    6000 Fairview Rd. Suite 1525<br>

  Charlotte, NC 28210</p>

  <p align="center"> </p>

  <p align="center"> </p>

  <ul>

   

    <p><br>

      <br>

      <br>

      <br>

      <br>

      <br>

      <br>

      <br>

      </p>

    <h1 align="center"> </h1>

    <p><br> 

        <br> 

      <br>

    </p>

<?PHP

$email = $HTTP_POST_VARS;

$mailto = "tlawrence@llmanagementinc.com";

$mailsubj = "LOI";

$mailhead = "From: LOI\r\n";

$mailhead = "CC: ".$_POST['EMAIL']."\r\n";

 

 

reset ($HTTP_POST_VARS);

$mailbody = "Values submitted from LOI:\n";

while (list ($key, $val) = each ($HTTP_POST_VARS))

{

$mailbody .= "$key : $val\n";

}

mail($mailto, $mailsubj, $mailbody, $mailhead);

 

echo '<pre>';

print_r($_POST);

echo '<pre>';

 

 

</SCRIPT>

<META HTTP-EQUIV="Refresh" Content="5000; URL=index.html">

</td>

</tr>

</table>

  <span class="style2">

<!-- end of content area -->

<!-- begin text link area -->

  </span>

  <table width="100%" border="0" cellpadding="0" cellspacing="0" id="linkbar">

<tr>

<td align="center" class="style2"><p><a href="index.html">Home</a> |<a href="contactus.html"> Contact Us</a></p>

<p>Leon Levine Foundation Copyright © 2009</p>

<p> </p></td>

</tr>

</table></tr>

</table>

 

</body>

</html>

 

 

Link to comment
Share on other sites

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>The Leon Levine Foundation</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="JavaScript" type="text/JavaScript">

<!--

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[n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}

 

function MM_showHideLayers() { //v6.0

  var i,p,v,obj,args=MM_showHideLayers.arguments;

  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args))!=null) { v=args[i+2];

    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }

    obj.visibility=v; }

}

//-->

</script>

<script language="JavaScript" type="text/JavaScript">

<!--

 

function MM_reloadPage(init) {  //reloads the window if Nav4 resized

  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

MM_reloadPage(true);

 

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.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

}

//-->

</script>

<link href="css/global.css" rel="stylesheet" type="text/css">

<style type="text/css">

<!--

.style2 {font-size: 24px}

.style7 {

font-size: 18px;

font-weight: bold;

font-style: italic;

}

.style10 {font-size: 14px; font-weight: bold; font-style: italic; }

.style11 {font-size: 14px}

.style12 {font-size: 16px; font-weight: bold; font-style: italic; }

-->

</style>

</head>

<body>

<!-- Wrapper div seeing stylesheet for styling  -->

<div id="wrapper">

<!-- Dropdown Div on button 3- see stylesheet for styling and positioning-->

<div id="dropdown3">

<table width="150" border="0" cellpadding="0" cellspacing="0" class="menu">

<tr>

<td><a href="grants.html#health">Healthcare </a></td>

</tr>

<tr>

<td><a href="grants.html#education">Education</a></td>

</tr>

<tr>

<td><a href="grants.html#jewish">Jewish Religon</a></td>

</tr>

<tr>

<td><a href="grants.html#human">Human Services</a></td>

</tr>

<tr>

<td><a href="grants.html#Emerging">Emerging Issues</a></td>

</tr>

</table>

</div>

<!-- end of dropdown 3 -->

<!-- Dropdown 4 div - see stylesheet for styling and positioning -->

<div id="dropdown4">

<table width="150" border="0" cellpadding="0" cellspacing="0" class="menu">

<tr>

<td><a href="apply.html#guidelines">Guidelines</a></td>

</tr>

<tr>

<td><a href="apply.html#eligibility">Eligibility</a></td>

</tr>

<tr>

<td><a href="faq.html">Faq's</a></td>

</tr>

</table>

</div>

<!-- End of Dropdown 4 -->

<!-- This is the closer div - mousing over this closes the dropdowns -->

<div id="closer"><a href="javascript:;" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide','closer','','hide')"><img src="graphics/shim.gif" alt="" width="700" height="190" border="0"></a> </div>

<!-- end of closer div -->

</div>

<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<!-- topleftside image -->

<td valign="top"><!-- company name table -->

<table width="750" border="0" cellpadding="0" cellspacing="0" id="logotbl">

<tr>

<!-- here we have set the show-hide behaviour to the header images, so that if someone mouses over these images the dropdown menus will hide - all explained in the help docs -->

<td><a href="index.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide','closer','','hide')"><img src="graphics/logo.gif" alt="" width="750" height="84" border="0" title=""></a></td>

</tr>

</table>

<!-- end logo table -->

<!-- navbar table -->

<table width="750" border="0" cellpadding="0" cellspacing="0" id="navbar">

<tr>

<td width="120" height="25"><a href="aboutus.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide','closer','','hide')"><img src="graphics/buttons/button1.gif" alt="" name="button1" width="120" height="25" border="0" id="button1" title=""></a></td>

<td><a href="mission.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide')">

<img src="graphics/buttons/button2.gif" alt="" name="button2" width="120" height="25" border="0" id="button2" title=""></a></td>

<td><a href="grants.html" onMouseOver="MM_showHideLayers('dropdown3','','show','dropdown4','','hide','closer','','show')">

<img src="graphics/buttons/button3.gif" alt="" name="button3" width="120" height="25" border="0" id="button3" title=""></a></td>

<td><a href="apply.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','show','closer','','show')">

<img src="graphics/buttons/button4.gif" alt="" name="button4" width="120" height="25" border="0" id="button4" title=""></a></td>

<td><a href="news.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide')">

<img src="graphics/buttons/button5.gif" alt="" name="button5" width="120" height="25" border="0" id="button5" title=""></a></td>

<td><a href="contactus.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide')">

<img src="graphics/buttons/button6.gif" alt="" name="button6" width="120" height="25" border="0" id="button6" title=""></a></td>

<td width="100%"> </td>

</tr>

</table></td>

<!-- outer table image topright side -->

</tr>

<tr>

<!-- outer table middle graphic -->

<td valign="top"><!--begin slogan content area - lady and company slogan area-->

<table border="0" cellpadding="0" cellspacing="0" id="slogansection">

<tr>

<td><img src="graphics/midsection.jpg" alt="" width="750" height="212" border="0"></td>

</tr>

</table></td>

<!-- outer table image rightside middle  -->

</tr>

<tr valign="top">

<!-- end of mid slogan area -->

<!-- start of main content area -->

<td height="546"><table width="750" border="0" cellpadding="0" cellspacing="0" id="contenttable">

<tr>

<td width="750" valign="top"><h1 align="center">

  <p>You may submit additional materials you feel may be helpful to the LOI to:</p>

  <p align="center">The Leon Levine Foundation<br>

    ATTN: Grants Administration<br>

    6000 Fairview Rd. Suite 1525<br>

  Charlotte, NC 28210</p>

  <p align="center"> </p>

  <p align="center"> </p>

  <ul>

   

    <p><br>

      <br>

      <br>

      <br>

      <br>

      <br>

      <br>

      <br>

      </p>

    <h1 align="center"> </h1>

    <p><br> 

        <br> 

      <br>

    </p>

<?PHP

$email = $HTTP_POST_VARS;

$mailto = "tlawrence@llmanagementinc.com";

$mailsubj = "LOI";

$mailhead = "From: LOI\r\n";

$mailhead = "CC: ".$_POST['EMAIL']."\r\n";

 

 

reset ($HTTP_POST_VARS);

$mailbody = "Values submitted from LOI:\n";

while (list ($key, $val) = each ($HTTP_POST_VARS))

{

$mailbody .= "$key : $val\n";

}

mail($mailto, $mailsubj, $mailbody, $mailhead);

 

echo '<pre>';

print_r($_POST);

echo '<pre>';

 

 

</SCRIPT>

<META HTTP-EQUIV="Refresh" Content="5000; URL=index.html">

</td>

</tr>

</table>

  <span class="style2">

<!-- end of content area -->

<!-- begin text link area -->

  </span>

  <table width="100%" border="0" cellpadding="0" cellspacing="0" id="linkbar">

<tr>

<td align="center" class="style2"><p><a href="index.html">Home</a> |<a href="contactus.html"> Contact Us</a></p>

<p>Leon Levine Foundation Copyright © 2009</p>

<p> </p></td>

</tr>

</table></tr>

</table>

 

</body>

</html>

 

 

Link to comment
Share on other sites

okay first off, here is your new letter.php

 

<?php

$email = $_POST['EMAIL'];
$mailto = 'tlawrence@llmanagementinc.com';
$mailsubj = "LOI";
$mailhead .= "FROM: LOI\r\n";
$mailhead .= "CC: ".$email."\r\n";
$mailbody = "Values submitted from LOI:\n";
while (list($key, $val) = each ($HTTP_POST_VARS)) {
$mailbody .= "$key : $val\n";
}

mail($mailto, $mailsubj, $mailbody, $mailhead);


header("LOCATION: letter.html");
?>

 

copy that exactly as is...

 

and here is your new page, letter.html

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>The Leon Levine Foundation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
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[n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
//-->
</script>
<link href="css/global.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {font-size: 24px}
.style7 {
   font-size: 18px;
   font-weight: bold;
   font-style: italic;
}
.style10 {font-size: 14px; font-weight: bold; font-style: italic; }
.style11 {font-size: 14px}
.style12 {font-size: 16px; font-weight: bold; font-style: italic; }
-->
</style>
</head>
<body>
<!-- Wrapper div seeing stylesheet for styling  -->
<div id="wrapper">
<!-- Dropdown Div on button 3- see stylesheet for styling and positioning-->
<div id="dropdown3">
<table width="150" border="0" cellpadding="0" cellspacing="0" class="menu">
<tr>
<td><a href="grants.html#health">Healthcare </a></td>
</tr>
<tr>
<td><a href="grants.html#education">Education</a></td>
</tr>
<tr>
<td><a href="grants.html#jewish">Jewish Religon</a></td>
</tr>
<tr>
<td><a href="grants.html#human">Human Services</a></td>
</tr>
<tr>
<td><a href="grants.html#Emerging">Emerging Issues</a></td>
</tr>
</table>
</div>
<!-- end of dropdown 3 -->
<!-- Dropdown 4 div - see stylesheet for styling and positioning -->
<div id="dropdown4">
<table width="150" border="0" cellpadding="0" cellspacing="0" class="menu">
<tr>
<td><a href="apply.html#guidelines">Guidelines</a></td>
</tr>
<tr>
<td><a href="apply.html#eligibility">Eligibility</a></td>
</tr>
<tr>
<td><a href="faq.html">Faq's</a></td>
</tr>
</table>
</div>
<!-- End of Dropdown 4 -->
<!-- This is the closer div - mousing over this closes the dropdowns -->
<div id="closer"><a href="javascript:;" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide','closer','','hide')"><img src="graphics/shim.gif" alt="" width="700" height="190" border="0"></a> </div>
<!-- end of closer div -->
</div>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<!-- topleftside image -->
<td valign="top"><!-- company name table -->
<table width="750" border="0" cellpadding="0" cellspacing="0" id="logotbl">
<tr>
<!-- here we have set the show-hide behaviour to the header images, so that if someone mouses over these images the dropdown menus will hide - all explained in the help docs -->
<td><a href="index.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide','closer','','hide')"><img src="graphics/logo.gif" alt="" width="750" height="84" border="0" title=""></a></td>
</tr>
</table>
<!-- end logo table -->
<!-- navbar table -->
<table width="750" border="0" cellpadding="0" cellspacing="0" id="navbar">
<tr>
<td width="120" height="25"><a href="aboutus.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide','closer','','hide')"><img src="graphics/buttons/button1.gif" alt="" name="button1" width="120" height="25" border="0" id="button1" title=""></a></td>
<td><a href="mission.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide')">
<img src="graphics/buttons/button2.gif" alt="" name="button2" width="120" height="25" border="0" id="button2" title=""></a></td>
<td><a href="grants.html" onMouseOver="MM_showHideLayers('dropdown3','','show','dropdown4','','hide','closer','','show')">
<img src="graphics/buttons/button3.gif" alt="" name="button3" width="120" height="25" border="0" id="button3" title=""></a></td>
<td><a href="apply.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','show','closer','','show')">
<img src="graphics/buttons/button4.gif" alt="" name="button4" width="120" height="25" border="0" id="button4" title=""></a></td>
<td><a href="news.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide')">
<img src="graphics/buttons/button5.gif" alt="" name="button5" width="120" height="25" border="0" id="button5" title=""></a></td>
<td><a href="contactus.html" onMouseOver="MM_showHideLayers('dropdown3','','hide','dropdown4','','hide')">
<img src="graphics/buttons/button6.gif" alt="" name="button6" width="120" height="25" border="0" id="button6" title=""></a></td>
<td width="100%"> </td>
</tr>
</table></td>
<!-- outer table image topright side -->
</tr>
<tr>
<!-- outer table middle graphic -->
<td valign="top"><!--begin slogan content area - lady and company slogan area-->
<table border="0" cellpadding="0" cellspacing="0" id="slogansection">
<tr>
<td><img src="graphics/midsection.jpg" alt="" width="750" height="212" border="0"></td>
</tr>
</table></td>
<!-- outer table image rightside middle  -->
</tr>
<tr valign="top">
<!-- end of mid slogan area -->
<!-- start of main content area -->
<td height="546"><table width="750" border="0" cellpadding="0" cellspacing="0" id="contenttable">
<tr>
<td width="750" valign="top"><h1 align="center">
  <p>You may submit additional materials you feel may be helpful to the LOI to:</p>
  <p align="center">The Leon Levine Foundation<br>
    ATTN: Grants Administration<br>
    6000 Fairview Rd. Suite 1525<br>
  Charlotte, NC 28210</p>
  <p align="center"> </p>
  <p align="center"> </p>
  <ul>
    
    <p><br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      </p>
    <h1 align="center"> </h1>
    <p><br>  
        <br>  
      <br>
    </p>
<META HTTP-EQUIV="Refresh" Content="5000; URL=index.html">
</td>
</tr>
</table>
  <span class="style2">
<!-- end of content area -->
<!-- begin text link area -->
  </span>
  <table width="100%" border="0" cellpadding="0" cellspacing="0" id="linkbar">
<tr>
<td align="center" class="style2"><p><a href="index.html">Home</a> |<a href="contactus.html"> Contact Us</a></p>
<p>Leon Levine Foundation Copyright © 2009</p>
<p> </p></td>
</tr>
</table></tr>
</table>

</body>
</html>

 

let me know how that works...  the other option before trying this, is right after the code i told you to enter (which can be removed now), you have </SCRIPT> instead of ?> to close the php.  this could be a solution to your issues as well..  try the easier one, then try the 3 file method (form, php, html success page)...

Link to comment
Share on other sites

THANKS!!  Well I think we are getting somewhere.  It looks like it is working but I never receive the cc email??  when I go to the main email I can see that the other email as a cc but it never shows up?  I even tried cc the main address to see if I received 2 emails but no go... Any ideas?  Onec again Thanks so much!!

Link to comment
Share on other sites

try this

 

<?php

$email = $_POST['EMAIL'];
$mailto = 'tlawrence@llmanagementinc.com';
$mailsubj = "LOI";
$mailhead .= "FROM: LOI\r\n";
$mailhead .= "CC: ".$email;
$mailbody = "Values submitted from LOI:\n";
while (list($key, $val) = each ($HTTP_POST_VARS)) {	
$mailbody .= "$key : $val\n";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);

header("LOCATION: letter.html");
?>

 

if that doesnt work try this:

 

<?php

$email = $_POST['EMAIL'];
$mailto = 'tlawrence@llmanagementinc.com';
$mailsubj = "LOI";
$headers = "From: LOI" . "\r\n" .
"CC: ".$email;

$mailhead .= "FROM: LOI\r\n";
$mailhead .= "CC: ".$email;
$mailbody = "Values submitted from LOI:\n";
while (list($key, $val) = each ($HTTP_POST_VARS)) {	
$mailbody .= "$key : $val\n";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);

header("LOCATION: letter.html");
?>

 

if that doesnt work try this

 

<?php

$email = $_POST['EMAIL'];
$mailto = 'tlawrence@llmanagementinc.com';
$mailsubj = "LOI";
$mailhead .= "FROM: LOI";
$mailbody = "Values submitted from LOI:\n";
while (list($key, $val) = each ($HTTP_POST_VARS)) {	
$mailbody .= "$key : $val\n";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
mail($email, $mailsubj, $mailbody, $mailhead);

header("LOCATION: letter.html");
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.