0

So i figured out how to embed drop down menu option on the table feature in dreamweaver, HOWEVER, when i go to remote view to see if all fields are working the dropdown box which I labeled package is now showing up in the email. How can I get this fixed? Any ideas. Thanks!

<?php

$to = 'info@adolphhernandez.com';
$subject = 'I want to book you!';

$name = $_POST['name'];
$email = $_POST['email'];
$cell = $_POST['cell'];
$package = $_POST['package'];
$comments = $_POST['comments'];
$available = $_POST['available'];
$promo = $_POST['promo'];

$body = <<<EMAIL

Hello my name is $name,

I would like to schedule a $package I am available on $available 

$comments

I can be reached at the following
Email: $email
Phone: $cell
Promo Code: $promo

Thank you,
$name

EMAIL;

$header = "From: $email";


if($_POST){
    mail($to, $subject, $body, $header);
$feedback = 'Your request has been sent, please allow 24/48 hours for a response. Thank you!';
    }

?>




<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>House Of Auroboros</title>
<style type="text/css">
<!--
body {
    margin: 0;
    padding: 0;
    background-image: url(banners/backgroundwebtemplate.jpg);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center center;
}

/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
    padding: 0;
    margin: 0;
    font-family: "Adobe Caslon Pro";
}
h1, h2, h3, h4, h5, h6, p {
    margin-top: 0;   /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
    padding-right: 15px;
    padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
    font-family: "Adobe Caslon Pro";
    color: #666;
    font-size: 10px;
    font-style: italic;
    line-height: normal;
    font-weight: normal;
    font-variant: normal;
}
a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
    border: none;
}

/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
a:link {
    color:#000000; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
    font-family: "Adobe Caslon Pro";
    font-size: 16px;
    font-style: oblique;
    line-height: normal;
    font-weight: normal;
    font-variant: normal;
}
a:visited {
    color: #666666;
    font-family: "Adobe Caslon Pro";
    font-size: 16px;
    font-style: normal;
    line-height: normal;
    font-weight: bold;
    font-variant: normal;
}
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
    text-decoration: blink;
    font-family: "Adobe Caslon Pro";
    font-size: 16px;
    font-style: normal;
    line-height: normal;
    font-weight: bolder;
    font-variant: normal;
    color: #292929;
}

/* ~~ this container surrounds all other divs giving them their percentage-based width ~~ */
.container {
    width: 80%;
    max-width: 700px;/* a max-width may be desirable to keep this layout from getting too wide on a large monitor. This keeps line length more readable. IE6 does not respect this declaration. */
    min-width: 650px;
    margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout. It is not needed if you set the .container's width to 100%. */
    font-family: "Adobe Caslon Pro";
    font-size: 15px;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    font-variant: normal;
    color: #333;
}

/* ~~the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo~~ */
.header {
}

/* ~~ This is the layout information. ~~ 

1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.

*/
.content {
    padding: 10px 0;
    font-family: "Adobe Caslon Pro";
    font-size: 15px;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    font-variant: normal;
    color: #666;
}

/* ~~ This grouped selector gives the lists in the .content area space ~~ */
.content ul, .content ol {
    padding: 0 15px 15px 40px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */
    font-family: "Adobe Caslon Pro";
    font-size: 15px;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    font-variant: normal;
    color: #666;
}

/* ~~ The footer ~~ */
.footer {
    padding: 10px 0;
    font-family: "Adobe Caslon Pro";
    font-size: 10px;
    font-style: italic;
    line-height: normal;
    font-weight: normal;
    font-variant: normal;
    color: #999;
}

/* ~~ miscellaneous float/clear classes ~~ */
.fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
    float: right;
    margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
    float: left;
    margin-right: 8px;
}
.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
}
.container .content txt {
    font-family: "Adobe Caslon Pro";
    font-size: 10px;
    font-style: italic;
    line-height: normal;
    font-weight: normal;
    font-variant: normal;
    color: #CCC;
}
-->
</style>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<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];}}
}
</script>


  <SCRIPT language=JavaScript>
<!-- http://www.spacegun.co.uk -->
    var message = "Stealing isn't nice!!! ^_^"; 
    function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){   alert(message); return false; } 
    if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) {  alert(message);     return false; } } 
    document.onmousedown = rtclickcheck;
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
  </SCRIPT>


</head>

<body>

<div class="container">
  <div class="header"><!-- end .header --> 
    <div align="center"> 
      <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="720" height="60">
        <param name="movie" value="media/greyHeaderHOA.swf" />
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="11.0.0.0" />
        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
        <param name="expressinstall" value="Scripts/expressInstall.swf" />
        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="media/greyHeaderHOA.swf" width="720" height="60">
          <!--<![endif]-->
          <param name="quality" value="high" />
          <param name="wmode" value="opaque" />
          <param name="swfversion" value="11.0.0.0" />
          <param name="expressinstall" value="Scripts/expressInstall.swf" />
          <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
          <div>
            <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
          </div>
          <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>
    </div>

<!--menu bar starts here-->

<ul id="MenuBar1" class="MenuBarHorizontal">
  <li>
    <div align="center"><a href="default.html">Home</a> </div>
  </li>
  <li>
    <div align="center"><a href="aboutme.html">About Me</a> </div>
  </li>
  <li>
    <div align="center"><a href="#" class="MenuBarItemSubmenu">Galleries</a>
      <ul>
        <li>
          <div align="center"><a href="#" class="MenuBarItemSubmenu">Men</a>
            <ul>
              <li><a href="MenStudio.html">Studio </a></li>
              <li><a href="MenOutdoors.html">Outdoors</a></li>
            </ul>
          </div>
        </li>
        <li>
          <div align="center"><a href="#" class="MenuBarItemSubmenu">Women</a>
            <ul>
              <li><a href="WomenStudio.html">Studio</a></li>
              <li><a href="WomenOutdoors.html">Outdoors</a></li>
            </ul>
          </div>
        </li>
        <li>
          <div align="center"><a href="Weddings.html">Wedding</a></div>
        </li>
        <li>
          <div align="center"><a href="Family.html">Family</a></div>
        </li>
        <li>
          <div align="center"><a href="Landscapes.html">Landscapes</a></div>
        </li>
        <li>
          <div align="center"><a href="Events.html">Events</a></div>
        </li>
        <li>
          <div align="center"><a href="GraphicDesigns.html">Graphic Design</a></div>
        </li>
        <li>
          <div align="center"><a href="Webdesigns.html">Web Design</a></div>
        </li>
      </ul>
    </div>
  </li>
  <li>
    <div align="center"><a href="bookme.php">Book Me</a></div>
  </li>
  <li>
    <div align="center"><a href="modelrelease.html">Model Release</a></div>
  </li>
  <li>
    <div align="center"><a href="payment.html">Payment</a></div>
  </li>
</ul>

<!--menu bare ends here-->    

  </div>
  <div class="content">
    <p align="center">

    <br>

  </div>
<h2 align="center">Book Me</h2>
<!--border starts here-->

<div style="width:700px; height:350px; border:6px inset grey; font-size: 9px;">

<div align="center">
  <!--email form begins here-->
  <br>

<form action="" method="post">
  <table width="700" border="1" cellspacing="2" cellpadding="0">
    <tr>
      <th width="181" scope="col"><label for="name">Name:</label></th>
      <th width="520" scope="col"><div align="left">
        <input type="text" name="name" id="name" required="required"/>
      </div></th>
    </tr>
    <tr>
      <th scope="row"><label for="email">Email:</label></th>
      <td><input type="text" name="email" id="email" required="required"/></td>
    </tr>
    <tr>
      <th scope="row"><label for="cell">Cell:</label></th>
      <td><input type="text" name="cell" id="cell" required="required"/></td>
    </tr>
    <tr>
      <th scope="row"><label for="available">Availability:</label></th>
      <td><input type="text" name="available" id="available" 

required="required"/></td>
    </tr>
    <tr>
      <th scope="row"><label for="promo">Promotion Code:</label></th>
      <td><input type="text" name="promo" id="promo" /></td>
    </tr>
    <tr>
      <th scope="row"><label for="comments">Comments:</label></th>
      <td><textarea name="comments2" id="comments2" cols="45" rows="5">

Edited by Ayinainsoph

4
Contributors
16
Replies
20
Views
4 Years
Discussion Span
Last Post by Ayinainsoph
0

looks like my code got cot off here is the rest as follows:

  </textarea></td>
    </tr>
    <tr>
      <th scope="row"><label for="pack">Package:</label></th>
      <td><select>
  <optgroup label="Photography Options">
<option value="headshots">Head Shots 2 edited images $45.00</option>
<option value="1hrstudiosession">1 hr Studio session 5 edited images 

$60.00</option>
<option value="2hrstudiosession">2 hr studio session 12 edited images 

$120.00</option>
<option value="2hrevent">2 hr Event Coverage 20 edited images $300.00</option>
<option value="4o6hrevent">4 - 6 hr Event Coverage 30 edited images $400-

$550.00</option>
<option value="wedding">Prices vary based on needs of client, please email me for 

price</option>
<option value="retouch">Photo Retouching or Repairs $10.00</option>
</optgroup>
<optgroup label="Design Options">
<option value="logo">Business or Personal Logo - Hi Res Graphic logo 

$300.00</option>
<option value="1pgweb">1 Paged website customizable and professional lay out 

$180.00</option>
<option value="2o3pgweb">2 to 3 Paged website customizable to your needs $275-

$400.00</option>
<option value="4omweb">Website with pages 4 and over please email me for 

prices</option>
<option value="fbflash">1 Flash page for your Facebook Page, attract more clients 

$180.00</option>
</optgroup>
<optgroup label="Other">
<option value="other">Other - please explain your needs in the comments 

section</option>
</optgroup>
</select>    
      </td>
      </tr>
      <tr>
        <td><input name="submit" type="submit" id="submit" onclick="MM_popupMsg('Thank you for submitting your request. Please allow 24 hours so we \r\rcan review your request. You will shortly receive a auto-reply email. \r\rThank you once again for your interest with House of Auroboros \r\rPhotography Studios')" value="Submit" /></td>
      </tr>
    </table>
  </form>





<!--email form ends here-->
</div>
<!--border ends here-->

    <br />
    </p>

    <div align="right">website created and designed by Adolph Hernandez</div>
  </p></div>

<div class="footer">
    <p align="center"><em>House Of Auroboros Studios © 2012. All rights reserved</em></p>
    <p align="left">    <!-- end .footer --></p>
</div>
<!-- end .container --></div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
swfobject.registerObject("FlashID");
</script>
</body>
</html>
0

Hi.

You labeled your dropdown list as 'pack' not 'package'. Use $_POST['pack'] to retrieve it.

Also, please don't send personal emails asking for help. I check the boards when I can :) thanks.

0

Sorry about that, I tried the changes you suggested (changed it all to package instead) and the input data is still not coming through the email. I know it has something to do with this code below but I dont know for sure.

 <tr>
      <th scope="row"><label for="package">Package:</label></th>
      <td><select>
  <optgroup label="Photography Options">
<option value="headshots">Head Shots 2 edited images $45.00</option>
<option value="1hrstudiosession">1 hr Studio session 5 edited images 

$60.00</option>
<option value="2hrstudiosession">2 hr studio session 12 edited images 

$120.00</option>
<option value="2hrevent">2 hr Event Coverage 20 edited images $300.00</option>
<option value="4o6hrevent">4 - 6 hr Event Coverage 30 edited images $400-

$550.00</option>
<option value="wedding">Prices vary based on needs of client, please email me for 

price</option>
<option value="retouch">Photo Retouching or Repairs $10.00</option>
</optgroup>
<optgroup label="Design Options">
<option value="logo">Business or Personal Logo - Hi Res Graphic logo 

$300.00</option>
<option value="1pgweb">1 Paged website customizable and professional lay out 

$180.00</option>
<option value="2o3pgweb">2 to 3 Paged website customizable to your needs $275-

$400.00</option>
<option value="4omweb">Website with pages 4 and over please email me for 

prices</option>
<option value="fbflash">1 Flash page for your Facebook Page, attract more clients 

$180.00</option>
</optgroup>
<optgroup label="Other">
<option value="other">Other - please explain your needs in the comments 

section</option>
</optgroup>
</select>    
      </td>
      </tr>
0

do the optgroup labels have anything to do with it? is what i forgot to post above.

0

Hi again,
sorry for the part answer before.
You forgot to give your select tag a name.
line 3 (of the above snippet) should read <td><select name="package">;
This will then allow you to collect $_POST['package'] from the form.

All form fields (input/select etc) need to be named so they can be referenced and collected by that name.

p.s. Your code would be much easier to read (smaller) if you put all that styling in a separate CSS file.

Edited by Zagga

0

that just seemed to bring out all the dropdown menu options and no longer are dropmenu available. :/

0

Would the option value have anything to do with it? Example from line 5 above?

<option value="headshots">Head Shots 2 edited images $45.00</option>
0

that just seemed to bring out all the dropdown menu options and no longer are dropmenu available. :/

Sorry, I don't understand what you mean.

The 'value' of the option is what is returned with the form (the value of whichever option was selected) so if 'Head shots 2 edited images $45.00' was selected, the value of $_POST['packages'] would be 'headshots' (in your example above)

0

ok was just making sure. I just dont know why I am still unable to retrive this data. :(

0

I take it you haven't gottan an email from this script at all yet?

$body = "<<<EMAIL
Hello my name is $name,
I would like to schedule a $package I am available on $available
$comments
I can be reached at the following
Email: $email
Phone: $cell
Promo Code: $promo
Thank you,
$name
EMAIL";

Change the $body variable to the above (notice the opening and closing quotes). I'm not sure what <<<EMAIL is supposed to do, as I still haven't read through all your code yet.

0

I am getting emails but the only value or data that is missing is the dropdown menu options.

0

Could you put this code at the top of the page (right under the <?php tag), fill the form in, submit it and tell me what is displayed onscreen?

if (isset($_POST['name'])){
    echo "Entire POST array: ";
    print_r($_POST);
    exit();
}
0

Hi,

try chaging this

<select>

to this

    <select name="package">

So, when you do this

    $package = $_POST['package'];

The value of the selected item from the option is posted.

0

Tried what you both recommended and neither is working :(. @ Zagga nothing is displaying after i sent a dummy email to myself with the code your provided.

0

Seems to be working now. What I did was remove the sub optsubs from the code and now seems to work just fine. Thanks guys! :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.