I need a rubber ducky to bounce my problem off...any takers?
I've created a custom form for people to fill out.
Form
The actual code for the form:
The file that it calls is mailer.phpCode:<script language='javascript'> function verifyMe(){ var msg=''; if(document.getElementById('name').value==''){ msg+='- Name\n\n';} var email=document.getElementById('email_address').value; if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email))){ msg+='- Invalid Email Address: '+email+'\n\n';} if(document.getElementById('email_address').value==''){ msg+='- Email Address\n\n';} if(document.getElementById('important').value==''){ msg+='- What\'s important to you when it comes to buying jewelry\n\n';} if(document.getElementById('last_purchase').value==''){ msg+='- When was the last time you purchased jewelry\n\n';} if(document.getElementById('other_locations').value==''){ msg+='- Do you purchase jewelry online or at other locations\n\n';} if(document.getElementById('jewelry_like').value==''){ msg+='- What type of jewelry do you like: rings, pins, necklace, chain, etc\n\n';} if(document.getElementById('color_preference').value==''){ msg+='- Do you have a color preference, i.e. Gold, Silver or Two-tone\n\n';} if(document.getElementById('pieces_owned').value==''){ msg+='- How many pieces of jewelry do you own\n\n';} if(document.getElementById('gifts').value==''){ msg+='- Do you give jewelry as gifts \n\n';} if(document.getElementById('favorite_church').value==''){ msg+='- Do you have a favorite Church or Not-for-Profit that you support \n\n';} if(document.getElementById('birthstone_color').value==''){ msg+='- What is your Birthstone color\n\n';} if(document.getElementById('interest').value==''){ msg+='- What range of jewelry interest you\n\n';} if(document.getElementById('hidden').value==''){ msg+='- \n\n';} if(msg!=''){ alert('The following fields are empty or invalid:\n\n'+msg); return false }else{ return true } } </script> <form name='project-hope' action='Survey' method='POST' action='store/contact/mailer.php' enctype='application/x-www-form-urlencoded' onsubmit='return verifyMe();'><input type='hidden' name='hidden' id='hidden' value=''> <table class='table_form_1' id='table_form_1' cellspacing='0' width="499"> <tr> <td class='ftbl_row_1' width="500" ><b style='color:red'>*</b>Name </td> </tr> <tr> <td class='ftbl_row_2' width="500" > <input type='text' name='name' id='name' size='57' value=''></td> </tr> <tr> <td class='ftbl_row_2' width="500" > </td> </tr> <tr> <td class='ftbl_row_2' width="500" ><b style='color:red'>*</b>Email Address </td> </tr> <tr> <td class='ftbl_row_1' width="500" > <input type='text' name='email_address' id='email_address' size='57' value=''></td> </tr> <tr> <td class='ftbl_row_1' width="500" > </td> </tr> <tr> <td class='ftbl_row_1' width="500" ><b style='color:red'>*</b>What's important to you when it comes to buying jewelry </td> </tr> <tr> <td class='ftbl_row_2' width="500" > <input type='text' name='important' id='important' size='57' value=''></td> </tr> <tr> <td class='ftbl_row_2' width="500" > </td> </tr> <tr> <td class='ftbl_row_2' width="500" ><b style='color:red'>*</b>When was the last time you purchased jewelry </td> </tr> <tr> <td class='ftbl_row_1' width="500" > <input type='text' name='last_purchase' id='last_purchase' size='57' value=''></td> </tr> <tr> <td class='ftbl_row_1' width="500" > </td> </tr> <tr> <td class='ftbl_row_1' width="500" ><b style='color:red'>*</b>Do you purchase jewelry online or at other locations </td> </tr> <tr> <td class='ftbl_row_2' width="500" > <input type='text' name='other_locations' id='other_locations' size='57' value=''></td> </tr> <tr> <td class='ftbl_row_2' width="500" > </td> </tr> <tr> <td class='ftbl_row_2' width="500" ><b style='color:red'>*</b>What type of jewelry do you like: rings, pins, necklace, chain, etc </td> </tr> <tr> <td class='ftbl_row_1' width="500" > <input type='text' name='jewelry_like' id='jewelry_like' size='57' value=''></td> </tr> <tr> <td class='ftbl_row_1' width="500" > </td> </tr> <tr> <td class='ftbl_row_1' width="500" ><b style='color:red'>*</b>Do you have a color preference, i.e. Gold, Silver or Two-tone </td> </tr> <tr> <td class='ftbl_row_2' width="500" > <input type='text' name='color_preference' id='color_preference' size='57' value=''></td> </tr> <tr> <td class='ftbl_row_2' width="500" > </td> </tr> <tr> <td class='ftbl_row_2' width="500" ><b style='color:red'>*</b>How many pieces of jewelry do you own </td> </tr> <tr> <td class='ftbl_row_1' width="500" > <input type='text' name='pieces_owned' id='pieces_owned' size='57' value=''></td> </tr> <tr> <td class='ftbl_row_1' width="500" > </td> </tr> <tr> <td class='ftbl_row_1' width="500" ><b style='color:red'>*</b>Do you give jewelry as gifts </td> </tr> <tr> <td class='ftbl_row_2' width="500" > <input type='text' name='gifts' id='gifts' size='57' value=''></td> </tr> <tr> <td class='ftbl_row_2' width="500" > </td> </tr> <tr> <td class='ftbl_row_2' width="500" ><b style='color:red'>*</b>Do you have a favorite Church or Not-for-Profit that you support </td> </tr> <tr> <td class='ftbl_row_1' width="500" > <input type='text' name='favorite_church' id='favorite_church' size='57' value=''></td> </tr> <tr> <td class='ftbl_row_1' width="500" > </td> </tr> <tr> <td class='ftbl_row_1' width="500" ><b style='color:red'>*</b>What is your Birthstone color </td> </tr> <tr> <td class='ftbl_row_2' width="500" ><select name='birthstone_color' id='birthstone_color'> <option value='Garnet'>Garnet</option> <option value=' Amethyst'> Amethyst</option> <option value=' Aquamarine'> Aquamarine</option> <option value=' White Topaz'> White Topaz</option> <option value=' Emerald'> Emerald</option> <option value=' Pearl'> Pearl</option> <option value=' Ruby'> Ruby</option> <option value=' Peridot'> Peridot</option> <option value=' Sapphire'> Sapphire</option> <option value=' Tourmaline'> Tourmaline</option> <option value=' Citrine'> Citrine</option> <option value=' Blue Topaz'> Blue Topaz</option> </select></td> </tr> <tr> <td class='ftbl_row_2' width="500" > </td> </tr> <tr> <td class='ftbl_row_2' width="500" ><b style='color:red'>*</b>What range of jewelry interest you </td> </tr> <tr> <td align='right' width="500"> <p align="left"><select name='interest' id='interest'> <option value='Costume'>Costume</option> <option value=' Mid-Range'> Mid-Range</option> <option value=' Fine'> Fine</option> </select></td> </tr> <tr> <td align='left'> </td> </tr> <tr> <td align='left'><input type='submit' name='submit' value='Submit'> <input type='reset' name='reset' value='Reset'><br /> </td> </tr> </table> </form>
Code for that file is:
When I fill out my form I get a page can't be found.Code:<?php if(isset($_POST['submit'])) { $to = "cornickjj######################"; $subject = "Survey Submission"; $name_field = $_POST['name']; $email_field = $_POST['email_address']; $important = $_POST['important']; $last_purchase = $_POST['last_purchase']; $other_locations = $_POST['other_locations']; $jewelry_like = $_POST['jewelry_like']; $color_preference = $_POST['color_preference']; $pieces_owned = $_POST['pieces_owned']; $gifts = $_POST['gifts']; $favorite_church = $_POST['favorite_church']; $birthstone_color = $_POST['birthstone_color']; $interest = $_POST['interest']; $body = "From: $name_field\n E-Mail: $email_field\n Survey:\n What's important to you when it comes to buying jewelry: $important\n When was the last time you purchased jewelry: $last_purchase\n Do you purchase jewelry online or at other locations: $other_locations\n What type of jewelry do you like: $jewelry_like\n Do you have a color preference: $color_preference\n How many pieces of jewelry do you own: $pieces_owned\n Do you give jewelry as gifts: $gifts\n Do you have a favorite Church or Not-for-Profit: $favorite_church\n Birthstone color: $birthstone_color\n What range of jewelry interest: $interest"; echo "Thank you for taking time to fill out the quick survey prepared for you."; mail($to, $subject, $body); } else { echo "Uh-oh...something is broken!"; } ?>
It's going to this url:
http://www.project-hope.info/store/mailer.php
When it should be going to this url
http://www.project-hope.info/store/contact/mailer.php
I thought I had it set properly...but apparently not.
Any ideas? It's probably not that complicated, I just can't figure it out.![]()





