Jump to content

phpforsilk

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

phpforsilk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sorry, but I tired that and it doesn't work.
  2. Hi there, I have coded a PHP site with mostly HTML so I can utilize include statements for the header and footer and side menus. My issue is this: I put all of the include files in a folder called includes. Then some of my files are at the root level and some are one directory lower. All of the files in different directories work fine with the include statement <?php include('../includes/header.php');?> because the header file is set up to access the various levels of the site "above" the include folder, so for example the header file grabs an image using ../images/whateverpath. When I try to include the header file in index.php (include(includes/header.php) it doesn't work because the header file is using paths inside the includes folder, if I strip away the ../ from inside the header file, then the index.php file works but then none of the other files in other directories work. It seems that I would need 2 header files for my site to work, but this isn't very efficient. How do I make the include files work on all levels of the site regardless of where they reside? If anyone can help me I would be forever grateful as I am very frustrated. Thanks,
  3. Thanks, I'll review it in that section - hopefully someone will be able to assist. Sorry to bug. Cheers
  4. Thank you - here is the code. <script language="JavaScript" type="text/javascript"> function validate() { if (document.forms['form1'].elements['FirstName'].value == "") { alert("Please enter your first name"); return false; } if (document.forms['form1'].elements['LastName'].value == "") { alert("Please enter your last name"); return false; } if (document.forms['form1'].elements['CompanyName'].value == "") { alert("Please enter your Company name"); return false; } if (document.forms['form1'].elements['Add1'].value == "") { alert("Please enter your address"); return false; } if (document.forms['form1'].elements['City'].value == "") { alert("Please enter your city"); return false; } if (document.forms['form1'].elements['ProvState'].value == "") { alert("Please enter your Province/State"); return false; } if (document.forms['form1'].elements['Country'].value == "") { alert("Please enter your Country"); return false; } if (document.forms['form1'].elements['Telephone'].value == "") { alert("Please enter your Phone Number"); return false; } if (document.forms['form1'].elements['Email'].value == "") { alert("Please enter your Email address"); return false; } if (document.forms['form1'].elements['New Design'].value == "") { alert("Please enter your Project Scope"); return false; } if (document.forms['form1'].elements['Pins'].value == "") { alert("Please enter your number of Pins"); return false; } if (document.forms['form1'].elements['Parts'].value == "") { alert("Please enter your number of components"); return false; } if (document.forms['form1'].elements['Nets'].value == "") { alert("Please enter your number of Nets"); return false; } if (document.forms['form1'].elements['layers'].value == "") { alert("Please enter your number of layers"); return false; } if (document.forms['form1'].elements['counts'].value == "") { alert("Please enter your signal layer count"); return false; } return true ; } </script> </head> <table cellspacing="0" cellpadding="0"> <tr> <td align="center"><a href="/index.php" class="headerlinks"><b>Home</b></a> | <a href="/contactus.php" class="headerlinks"><b>Contact Us</b></a> | <a href="/sitemap.php" class="headerlinks"><b>Site Map</b></a> <br /> <br /> <div align="center"><form name="form1" id="form1" style="padding:0px; margin:0px;"> <select name="menu1" onchange="MM_jumpMenu('parent',this,0)" style="border: solid #6C8DAC 1px; background: #FFFFFF; color: #76777A; font-size:10px;"> <option selected="selected" style="color:#101C44;">I need to know . . .</option> <option value="/expertise.php">What do you do?</option> <option value="/Company/choosefidus.php">Why Fidus?</option> <option value="/careers.php">Are you hiring?</option> <option value="/contactus.php">How can I contact you?</option> <option value="/search.php">I'd like to search for...</option> <option value="mailto:info@fidus.com">The answer to my question is not here ...</option> <option value="mailto:Feedback@fidus.com?subject=A suggestion for Fidus">Fidus suggestion box</option> </select> </form> <form name="form1" form action="FormToEmail.php" method="post" onsubmit="return validate()"> <p align="left" class="style1"><strong>PCB Layout Quote Form </strong></p> <table border="1" cellspacing="0" cellpadding="0" width="571">
  5. Hello PHP Gurus - I have a php form that has some validation code within it that I can't seem to figure out why it isn't working on a particular server. http://www.fidus.com/test/pcb_layout_form.php - the form emails results and returns the "thankyou page" but it doesn't recognize the validation script on the particular server it is on. I have tested it on another server and it works. Can anyone help? Not sure what else you require in order to review the issue, so please advise. Thanks so much - I am pulling my hair out to firgure this out. Thanks!
  6. My sincere apologies, I am a true newbie and I did put in Red where the code starts and ends. Some people say post the code, others don't. Again, I am sorry to have bugged you.
  7. So I've tried to create a new file as instructed but the email still doesn't go. I've downloaded phpmailer, but I don't understand the php.ini file as the site that I'm working on doesn't have this file. Can someone please look at my code and explain what I have to enter in order for all the elements of the form to be sent via email? Thanks so much.
  8. Thanks for the quick response. I am a true rookie at PHP, do you think you could explain how I do this? Thank you...
  9. OK, thanks....here goes.....sorry it's so long... The form code is: <form action="FormToEmail.php" method=POST class="style9"> <p align="left" class="style1"><strong>PCB Layout Quote Form </strong></p> <table border="1" cellspacing="0" cellpadding="0" width="550"> <tr> <td colspan="2" class="olderbluetext"><span class="style1 olderbluetext"><strong><span class="olderbluetext style1">Contact Information</span></strong></span></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">First Name * (required) </p></td> <td width="266" class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="30" NAME="FirstName"> </p></td> </tr> <tr> <td class="olderbluetext"><p align="left" class="style1">Last Name * </p></td> <td class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="30" NAME="LastName"> </p></td> </tr> <tr> <td class="olderbluetext"><p align="left" class="style1">Company Name * </p></td> <td class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="30" NAME="CompanyName"> </p></td> </tr> <tr> <td rowspan="2" valign="top" class="olderbluetext"><p align="left" class="style1">Address * </p></td> <td valign="top" class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="30" NAME="Add1"> </p></td> </tr> <tr> <td class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="30" NAME="Add2"> </p></td> </tr> <tr> <td class="olderbluetext"><p align="left" class="style1">City * </p></td> <td class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="30" NAME="City"> </p></td> </tr> <tr> <td class="olderbluetext"><p align="left" class="style1">Province/State * </p></td> <td class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="30" NAME="City"> </p></td> </tr> <tr> <td class="olderbluetext"><p align="left" class="style1">Country * </p></td> <td class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="20" NAME="Zip"> </p></td> </tr> <tr> <td class="olderbluetext"><p align="left" class="style1">Postal/Zip Code</p></td> <td class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="20" NAME="Zip"> </p></td> </tr> <tr> <td class="olderbluetext"><p align="left" class="style1">Telephone * </p></td> <td class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="33" NAME="TelAreaCode"> <br> Ext. <INPUT TYPE="TEXT" SIZE="5" NAME="TelExt"> </p> </td> </tr> <tr> <td class="olderbluetext"><p align="left" class="style1">Fax </p></td> <td class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="40" NAME="FaxAreaCode"> </p></td> </tr> <tr> <td class="olderbluetext"><p align="left" class="style1">E-Mail * </p></td> <td class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="40" NAME="email"> </p></td> </tr> <tr> <td class="olderbluetext"><p align="left" class="style1">How would you like us to contact you? * </p></td> <td class="olderbluetext"><p class="style1"> <SELECT NAME="ContactClientVia[]" multiple" class=""> <OPTION SELECTED VALUE="Telephone">Telephone <OPTION VALUE="E-Mail">E-Mail <OPTION VALUE=" "> </SELECT> </p></td> </tr> <tr> <td class="olderbluetext"><p align="left" class="style1">How did you hear about us? </p></td> <td class="olderbluetext"><p class="style1"> <SELECT NAME="FoundUsBy[]" multiple" class=""> <OPTION VALUE="Referal">Referral <OPTION VALUE="Search Engine">Fidus representative <OPTION SELECTED VALUE="Banner Ad"> Search Engine <OPTION VALUE="Advertising">Advertising <OPTION VALUE=" news/article"> news/article <OPTION VALUE=" Event"> Event <OPTION VALUE=" Other"> Other </SELECT> </p></td> </tr> </table> <table border="1" cellspacing="0" cellpadding="0" width="550"> <tr> <td colspan="2" class="olderbluetext"><strong><br> <span class="style1">PCB Layout/Design</span></strong></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Planned Project Start Date * </p></td> <td width="266" class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="5" NAME="EMail2"> dd <INPUT TYPE="TEXT" SIZE="5" NAME="EMail2"> mm <INPUT TYPE="TEXT" SIZE="5" NAME="EMail2"> yyyy </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Planned Completion Date</p></td> <td width="266" class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="5" NAME="EMail2"> dd <INPUT TYPE="TEXT" SIZE="5" NAME="EMail2"> mm <INPUT TYPE="TEXT" SIZE="5" NAME="EMail2"> yyyy </p></td> </tr> <tr> <td colspan="2" class="olderbluetext"><p align="left" class="style1"><strong><br> Project Information<br> <br> </strong> </p></td> </tr> <tr> <td width="278" valign="top" class="olderbluetext"><p align="left" class="style1">Project Scope (Select One)</p></td> <td width="266" valign="bottom" class="olderbluetext"><span class="style1"> <INPUT TYPE="checkbox" NAME="FormTech3" VALUE="SIMM/DIMM"> New Design <INPUT TYPE="checkbox" NAME="FormTech3" VALUE="AGP"> Redesign </span></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Board Name </p></td> <td width="266" class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="30" NAME="BoardName"> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Number of Pins *</p></td> <td width="266" class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="4" NAME="Pins"> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Number of Components * </p></td> <td width="266" class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="4" NAME="Parts"> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Number of Nets * </p></td> <td width="266" class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="4" NAME="Nets"> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Please attach a soft copy of schematics </p></td> <td width="266" class="olderbluetext"><p class="style1"> <input type="file" name="file"> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Will you provide PCB layout guidelines? </p></td> <td width="266" class="olderbluetext"><p class="style1"> <SELECT NAME="GeneralPCBSuggestions" class=""> <OPTION VALUE="25">Yes <OPTION SELECTED VALUE="0">No </SELECT> <input type="file" name="file2"> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Will you provide mechanical details? </p></td> <td width="266" class="olderbluetext"><p class="style1"> <SELECT NAME="ConnectorPCBSuggestions" class=""> <OPTION SELECTED VALUE="0">Yes <OPTION VALUE="25">No </SELECT> <input type="file" name="file3"> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Will you provide a Preliminary Placement? </p></td> <td width="266" class="olderbluetext"><p class="style1"> <SELECT NAME="PlacementAdder" class=""> <OPTION SELECTED VALUE="0">Yes <OPTION VALUE="25">No </SELECT> <input type="file" name="file4"> </p></td> </tr> </table> <table border="1" cellspacing="0" cellpadding="0" width="550"> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Required PCB Layout Tool?</p></td> <td width="266" class="olderbluetext"><p class="style1"> <SELECT NAME="Layout Tool" class=""> <OPTION SELECTED VALUE="Allegro 15.5.1">Allegro 15.5.1 <OPTION VALUE="Allegro 15.7">Allegro 15.7 <OPTION VALUE="Allegro 16.1">Allegro 16.1 <OPTION VALUE="PADS">PADS <OPTION VALUE="Altium">Altium <OPTION VALUE="PCAD">PCAD <OPTION VALUE="Other">Other, please specify </SELECT> <br> If Other, specify: <input type="TEXT" size="20" name="OtherBoardThickness2"> <br> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Board Thickness </p></td> <td width="266" class="olderbluetext"><p class="style1"> <SELECT NAME="BoardThickness" class=""> <OPTION SELECTED VALUE=".062">.062 (Typical PCB) <OPTION VALUE=".018">.018 <OPTION VALUE=".031">.031 (Typical PCMCIA) <OPTION VALUE=".047">.047 <OPTION VALUE=".093">.093 (Typical VME) <OPTION VALUE=".125">.125 (Typical Back Plane) <OPTION VALUE="Other">Other, please specify </SELECT> inches<br> If Other, specify: <INPUT TYPE="TEXT" SIZE="20" NAME="OtherBoardThickness"> inches </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Number of Layers * </p></td> <td width="266" class="olderbluetext"><textarea name="textarea" cols="30" rows="3"></textarea></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Signal Layer Count * </p></td> <td width="266" class="olderbluetext"><p class="style1"> <textarea name="textarea2" cols="30" rows="3"></textarea> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Board Size</p></td> <td width="266" class="olderbluetext"><p class="style1"> <INPUT TYPE="TEXT" SIZE="10" NAME="OtherBoardThickness"> x <INPUT TYPE="TEXT" SIZE="8" NAME="OtherBoardThickness"> <INPUT TYPE="checkbox" NAME="FormTech" VALUE="PCMCIA"> in <INPUT TYPE="checkbox" NAME="FormTech" VALUE="PCMCIA"> cm</p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Board Type </p></td> <td width="266" class="olderbluetext"><p class="style1"> <SELECT NAME="BoardType" class=""> <OPTION VALUE="Single Board">Single Board <OPTION VALUE="2 Boards" selected>2 Boards <OPTION VALUE="3 Boards">3 Boards </SELECT> (not required) <br> <input type="text" name="textfield3"> <br> <br> </p> </td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Component Geometry </p></td> <td width="266" class="olderbluetext"><p class="style1"> <select name="ComponentGeo" class=""> <option value="Leaded, one side">Through hole , one side <option value="Leaded, both sides">Through hole , both sides <option value="SMD, one side">SMD, one side <option value="SMD, both sides">SMD, both sides <option value="SMD one side, opposite side leaded">SMD one side, opposite side Through hole <option value="SMD one side, same side leaded">SMD one side, same side Through hole <option selected value="SMD both sides, leaded one side">SMD both sides, Through hole one side <option value="SMD both sides, leaded both sides">SMD both sides, Through hole both sides <option value="BGA">BGA <option value="Flip Chip">Flip Chip <option value="Die Bond">Die Bond </select> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Functional Test Points? </p></td> <td width="266" class="olderbluetext"><p class="style1"> <SELECT NAME="FuncTestPoints" class=""> <OPTION SELECTED VALUE="No">No <OPTION VALUE="Yes, Top and Bottom">Yes, Top & Bottom <OPTION VALUE="Yes, Top Only">Yes, Top Only <OPTION VALUE="Yes, Bottom Only">Yes, Bottom Only </SELECT> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">In-Circuit Test Points? * </p></td> <td width="266" class="olderbluetext"><p class="style1"> <SELECT NAME="ICTPoints" class=""> <OPTION SELECTED VALUE="No">No <OPTION VALUE="Yes, Top and Bottom, Up to 100%">Yes, Top & Bottom, Up to 100% <OPTION VALUE="Yes, Top Only, Up to 100%">Yes, Top Only, Up to 100% <OPTION VALUE="Yes, Bottom Only, Up to 100%">Yes, Bottom Only, Up to 100% <OPTION VALUE="Yes, Top and Bottom, 100% Only">Yes, Top & Bottom, 100% Only <OPTION VALUE="Yes, Top Only, 100% Only">Yes, Top Only, 100% Only <OPTION VALUE="Yes, Bottom Only, 100% Only">Yes, Bottom Only, 100% Only </SELECT> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Special Design Guidelines? * </p></td> <td width="266" class="olderbluetext"><p class="style1"> <select name="select3" class=""> <option selected value="No">No <option value="Yes">Yes </select> Description <textarea name="OtherBoardThickness" cols="40" rows="5"></textarea> </p> <p class="style1"> <input type="file" name="file5"> </p></td> </tr> <tr> <td class="olderbluetext style1">Blind/Buried/Micro Vias?</td> <td class="olderbluetext"><SELECT NAME="blindburiedmicrovias" class=""> <OPTION SELECTED VALUE="No">No <OPTION VALUE="Yes">Yes </SELECT></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Electronics Assembly Standards</p></td> <td width="266" class="olderbluetext"><p class="style1">IPC <INPUT TYPE="TEXT" SIZE="20" NAME="OtherBoardThickness"> <br> Class <INPUT TYPE="TEXT" SIZE="20" NAME="OtherBoardThickness"> <br> Level <INPUT TYPE="TEXT" SIZE="20" NAME="OtherBoardThickness"> <br> Other <INPUT TYPE="TEXT" SIZE="20" NAME="OtherBoardThickness3"> </p> </td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">EMI Shielding?</p></td> <td width="266" class="olderbluetext"><p class="style1"> <SELECT NAME="SpecialDesignGuidelines" class=""> <OPTION SELECTED VALUE="No">No <OPTION VALUE="Yes">Yes </SELECT> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">BGA Pin spacing < 1mm?</p></td> <td width="266" class="olderbluetext"><p class="style1"> <SELECT NAME="SpecialDesignGuidelines" class=""> <OPTION SELECTED VALUE="No">No <OPTION VALUE="Yes">Yes </SELECT> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">BGA or Other Device Sockets?</p></td> <td width="266" class="olderbluetext"><p class="style1"> <SELECT NAME="SpecialDesignGuidelines" class=""> <OPTION SELECTED VALUE="No">No <OPTION VALUE="Yes">Yes </SELECT> </p></td> </tr> <tr> <td width="278" class="olderbluetext"><p align="left" class="style1">Via Stitching?</p></td> <td width="266" class="olderbluetext"><p class="style1"> <SELECT NAME="SpecialDesignGuidelines" class=""> <OPTION SELECTED VALUE="No">No <OPTION VALUE="Yes">Yes </SELECT> </p></td> </tr> </table> <table border="1" cellspacing="0" cellpadding="0" width="550"> <tr> <td width="278"><p align="left" class="style1">Heat Sinking Required?</p></td> <td width="266"><p class="style1"> <SELECT NAME="select" class=""> <OPTION SELECTED VALUE="No">No <OPTION VALUE="Yes">Yes </SELECT> <br> Please specify <input type="text" name="textfield2"> </p></td> </tr> <tr> <td colspan="2"><table width="100%" border="0" align="center" cellpadding="0"> <tr> <td colspan="2"><div align="center" class="style1"> <div align="left"><strong><br> Routing Technology - Check all that apply </strong></div> </div></td> </tr> <tr> <td width="49%"><span class="style1"> <INPUT TYPE="checkbox" NAME="Controlled Impedance" VALUE="Yes"> Controlled Impedance </span></td> <td width="51%" valign="bottom"><p class="style1"> <INPUT TYPE="checkbox" NAME="High Speed Digital" VALUE="Yes"> High Speed Digital (> 100 MHz) </p></td> </tr> <tr> <td width="49%"><p class="style1"> <INPUT TYPE="checkbox" NAME="Differential_Pairs" VALUE="Yes"> Differential Pairs </p></td> <td width="51%"><p class="style1"> <INPUT TYPE="checkbox" NAME="Digital" VALUE="Yes"> Digital (> 3 GHz)</p></td> </tr> <tr> <td width="49%"><p class="style1"> <INPUT TYPE="checkbox" NAME="Matched Line Lengths" VALUE="Yes"> Matched Line Lengths </p></td> <td width="51%"><p class="style1"> <INPUT TYPE="checkbox" NAME="Analog" VALUE="Yes"> Analog </p></td> </tr> <tr> <td width="49%"><p class="style1"> <INPUT TYPE="checkbox" NAME="Mil-Std-xxx" VALUE="Yes"> Military Standard </p></td> <td width="51%"><p class="style1"> <INPUT TYPE="checkbox" NAME="Radio Frequency" VALUE="Yes"> Radio Frequency </p></td> </tr> <tr> <td width="49%"><p class="style1"> <INPUT TYPE="checkbox" NAME="High Voltage" VALUE="Yes"> High Voltage </p></td> <td width="51%"><p class="style1"> </p></td> </tr> </table> </div></td> </tr> <tr> <td colspan="2"><table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td colspan="3" class="style1"><div align="center"> <p align="left"><strong><br> Interconnect Technology - Check all that apply </strong></p> </div></td> </tr> <tr> <td width="33%" class="style1"><input type="checkbox" name="FormTech2" value="Custom Design"> Custom Design </td> <td width="33%" valign="bottom" class="style1"><p> <input type="checkbox" name="FormTech2" value="PCMCIA"> PCMCIA </p></td> <td width="33%" valign="bottom" class="style1"><p> <input type="checkbox" name="FormTech2" value="VME 3U 6U 9U"> VME 3U 6U 9U </p></td> </tr> <tr> <td width="33%" class="style1"><p> <input type="checkbox" name="FormTech2" value="ISA 8 / 16 Bit PC Bus"> ISA 8 / 16 Bit PC Bus </p></td> <td width="33%" class="style1"><p> <input type="checkbox" name="FormTech2" value="PCI Bus"> PCI Bus </p></td> <td width="33%" class="style1"><p> <input type="checkbox" name="FormTech2" value="SIMM/DIMM"> SIMM/DIMM </p></td> </tr> <tr> <td class="style1"><input type="checkbox" name="FormTech24" value="High-Speed Backplanes"> High-Speed Backplanes</td> <td class="style1"><input type="checkbox" name="FormTech23" value="PC-104"> PC-104 </td> <td class="style1"><input type="checkbox" name="FormTech22" value="AGP"> PCI Express </td> </tr> <tr> <td colspan="3" class="style1"><p>Other <input type="text" name="textfield"> </td> </tr> </table> </div></td> </tr> <tr> <td colspan="2" class="olderbluetext"><p align="left" class="style1"><strong><br> Design Deliverables -- Check all that apply </strong> </p></td> </tr> <tr> <td width="278" valign="top" class="olderbluetext"><p class="style1"> <INPUT TYPE="checkbox" NAME="DeliverFabDrawing" VALUE="Yes"> Fabrication Package<br> <INPUT TYPE="checkbox" NAME="DeliverFabDrawing" VALUE="Yes"> Fabrication Drawing<br> <INPUT TYPE="checkbox" NAME="DeliverGBR/DrillFiles" VALUE="Yes"> Gerber and Drill Files<br> <INPUT TYPE="checkbox" NAME="DeliverAssemblyDrawingTop" VALUE="Yes"> Assembly Drawing, Top (PDF or DXF)<br> <input type="file" name="file9"> <br> <INPUT TYPE="checkbox" NAME="DeliverAssemblyDrawingBottom" VALUE="Yes"> Assembly Drawing, Bottom (PDF file)<br> <input type="file" name="file10"> <br> <INPUT TYPE="checkbox" NAME="DeliverAssemblyDrawingTop" VALUE="Yes"> Silk Screen<br> <INPUT TYPE="checkbox" NAME="DeliverAssemblyDrawingTop" VALUE="Yes"> Test Point NC Data<br> <INPUT TYPE="checkbox" NAME="DeliverAssemblyDrawingTop3" VALUE="Yes"> NC Route Data<br> <input type="checkbox" name="DeliverAssemblyDrawingTop22" value="Yes"> IPC-D-356 Export<br> <input type="checkbox" name="DeliverAssemblyDrawingTop222" value="Yes"> Fabrication Drawing (PDF or DXF) <input type="file" name="file8"> <br> </p> <p class="style1"> </p></td> <td width="266" valign="top" class="olderbluetext"><p class="style1"><INPUT TYPE="checkbox" NAME="DeliverBOM" VALUE="Yes"> BOM <input type="file" name="file6"> <br> <INPUT TYPE="checkbox" NAME="DeliverCheckPlots" VALUE="Yes"> Check Plots<br> <INPUT TYPE="checkbox" NAME="DeliverArchiveSet" VALUE="Yes"> Archive Set<br> <INPUT TYPE="checkbox" NAME="DeliverArchiveSetCD" VALUE="Yes"> Archive Set on FTP site<br> <INPUT TYPE="checkbox" NAME="DeliverArchiveSetCD" VALUE="Yes"> Valor extract files (ODB++)<br> <INPUT TYPE="checkbox" NAME="DeliverArchiveSetCD" VALUE="Yes"> Signal Integrity Report<br> <INPUT TYPE="checkbox" NAME="DeliverAssemblyDrawingTop2" VALUE="Yes"> Placement Data<br> <INPUT TYPE="checkbox" NAME="DeliverAssemblyDrawingTop23" VALUE="Yes"> Datasheet <input type="file" name="file7"> <br> </p> </td> </tr> </table> <table border="1" cellspacing="0" cellpadding="0" width="550"> <tr> <td width="546"><p><span class="maintextcell style1"><strong>Additional Project Details</strong> </span><br> <TEXTAREA NAME="DesignNotes" COLS="65" ROWS="9"></TEXTAREA> </p></td> </tr> </table> <p> <input type="submit" name="Submit" value="Submit"></form> THEN THE FORMTOEMAIL CODE is: <?php $my_email = "sarah@silkwebsolutions.com"; $errors = array(); // Remove $_COOKIE elements from $_REQUEST. if(count($_COOKIE)){foreach(array_keys($_COOKIE) as $value){unset($_REQUEST[$value]);}} // Validate email field. if(isset($_REQUEST['email']) && !empty($_REQUEST['email'])) { $_REQUEST['email'] = trim($_REQUEST['email']); if(substr_count($_REQUEST['email'],"@") != 1 || stristr($_REQUEST['email']," ")){$errors[] = "Email address is invalid";}else{$exploded_email = explode("@",$_REQUEST['email']);if(empty($exploded_email[0]) || strlen($exploded_email[0]) > 64 || empty($exploded_email[1])){$errors[] = "Email address is invalid";}else{if(substr_count($exploded_email[1],".") == 0){$errors[] = "Email address is invalid";}else{$exploded_domain = explode(".",$exploded_email[1]);if(in_array("",$exploded_domain)){$errors[] = "Email address is invalid";}else{foreach($exploded_domain as $value){if(strlen($value) > 63 || !preg_match('/^[a-z0-9-]+$/i',$value)){$errors[] = "Email address is invalid"; break;}}}}}} } // Check referrer is from same site. if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){$errors[] = "You must enable referrer logging to use the form";} // Check for a blank form. function recursive_array_check_blank($element_value) { global $set; if(!is_array($element_value)){if(!empty($element_value)){$set = 1;}} else { foreach($element_value as $value){if($set){break;} recursive_array_check_blank($value);} } } recursive_array_check_blank($_REQUEST); if(!$set){$errors[] = "You cannot send a blank form";} unset($set); // Display any errors and exit if errors exist. if(count($errors)){foreach($errors as $value){print "$value<br>";} exit;} if(!defined("PHP_EOL")){define("PHP_EOL", strtoupper(substr(PHP_OS,0,3) == "WIN") ? "\r\n" : "\n");} // Build message. function build_message($request_input){if(!isset($message_output)){$message_output ="";}if(!is_array($request_input)){$message_output = $request_input;}else{foreach($request_input as $key => $value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace("_"," ",ucfirst($key)).": ".build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).", ";}}}}return rtrim($message_output,", ");} $message = build_message($_REQUEST); $message = $message . PHP_EOL.PHP_EOL."-- ".PHP_EOL."Thank you"; $message = stripslashes($message); $subject = "PCB Layout Quote Request"; $headers = "From: " . $_REQUEST['email']; $headers .= PHP_EOL; $headers .= "Return-Path: " . $_REQUEST['email']; $headers .= PHP_EOL; $headers .= "Reply-To: " . $_REQUEST['email']; mail($my_email,$subject,$message,$headers); <b>Thank you <?php print stripslashes($_REQUEST['FirstName']); ?></b> <div align="center"><br> Your form has been submitted </div> <p align="center"><a href="<?php print $continue; ?>">Click here to return to the Fidus homepage</a></p> Please use tags when posting code.
  10. Hi there, I've created a form in a PHP site and used a "FormToEmail.php" script from the web but I cannot get the contents of the form to email. Can someone help me? I'm not sure if I'm supposed to insert all of my code here so I'll wait to see what the response is. Thanks so much. SiLK
  11. Sorry, Here's the code....I'm new to all of this so please bear with me. Thanks to anyone that can help. Cheers, <? /* Required Files */ require_once('../common/application.php'); require_once('../common/functions.php'); /* set defaults */ if ($_POST['email_type'] == "demorequest"){ if ($_POST['email_type'] == "inforequest"){ // generate CORE Software Corp. email content $content = "The following person has completed the form to access the Renaissance Architect Demo.\n\n"; $content .= "{$_POST['firstname']} {$_POST['lastname']}\n"; $content .= "{$_POST['company']}\n"; $content .= "{$_POST['email']}\n\n"; $to = "wlucky@coresoftwarecorp.com" . ", "; $to .= "lwallace@coresoftwarecorp.com"; $subject = "Renaissance Architect Demo request"; // sending email mail($to, $subject, "{$content}","From: webmaster@coresoftwarecorp.com"); } /* Send the potential customer to the demo now. */ header("Location: http://www.coremigration.com/demo/interface.html"); /* set defaults */ setPOST("wp_bus", 0); setPOST("wp_tech", 0); setPOST("cs_npb", 0); setPOST("cs_vis", 0); setPOST("bro_core", 0); setPOST("ebul", 0); $date = date("Ymd"); /* Create DB reference */ $db = &$_APP['masterdb']; $db->connect(); // insert fields $sql = "INSERT INTO t_inforequests (salutation, name, company, telephone, title, email, migration, migration_start, findus, wp_bus, wp_tech, cs_npb, cs_vis, bro_core, requestedon, ebul, isdeleted) VALUES ('{$_POST['salutation']}', '{$_POST['name']}', '{$_POST['company']}', '{$_POST['telephone']}', '{$_POST['title']}','{$_POST['email']}', '{$_POST['migration']}', '{$_POST['migration_start']}', '{$_POST['findus']}', {$_POST['wp_bus']}, {$_POST['wp_tech']}, {$_POST['cs_npb']}, {$_POST['cs_vis']}, {$_POST['bro_core']}, '{$date}',{$_POST['ebul']},0)"; $req_insert = $db->query($sql); // generate client email content $content = "To view the documents that you requested, please go to\n\n"; if ($_POST['wp_bus']) $content .= "http://www.coremigration.com/pdf/Core_Migration_Business_WP.pdf\n"; if ($_POST['wp_tech']) $content .= "http://www.coremigration.com/pdf/Core_Migration_Technical_WP.pdf\n"; if ($_POST['cs_npb']) $content .= "http://www.coremigration.com/pdf/CORE_study_NPB.pdf\n"; if ($_POST['cs_vis']) $content .= "http://www.coremigration.com/pdf/CORE_study_VISaer.pdf\n"; if ($_POST['bro_core']) $content .= "http://www.coremigration.com/pdf/COREbrochure.pdf\n"; if ($_POST['ebul']) $content .= "\n\nYou have also been signed up for our monthly e-bulletin as per your request.\n\n"; $content .= "\nIf you have any questions, please contact us directly.\n\n"; $content .= "Or, if you would like to know how long it will take to migrate your legacy PowerHouse application, or how much will it cost, please go to our free estimate at the following URL http://www.coremigration.com/options_estimate.html\n\n"; $content .="Thank you.\nCORE Migration - The proven PowerHouse migration method\n"; $content .="Tel: 613.727.5051\n"; $content .="Fax: 613.727.2603\n"; $content .="Toll-free: 1-877-768-2673 (in Canada, United States)\n\n"; $content .="Sales: sales@coremigration.com\n"; $content .="Career Opportunities: careers@coremigration.com\n"; $content .="General Inquiries and comments: info@coremigration.com\n"; // sending email mail("{$_POST['email']}", "The CORE Migration documents that you requested", "{$content}","From: sales@coremigration.com"); // generate CORE email content $content = "The following person has requested documents from the CORE website.\n\n"; $content .= "These documents were automatically forwarded to them.\n\n"; if ($_POST['ebul']) $content .= "The client was also signed up for the monthly e-bulletin\n\n"; $content .= "{$_POST['salutation']} {$_POST['name']}\n"; $content .= "{$_POST['company']}\n"; $content .= "{$_POST['telephone']}\n"; $content .= "{$_POST['email']}\n\n"; $content .= "The administrative section of the CORE website has been updated accordingly.\n"; $content .= "http://www.coremigration.com/admin/index.php\n"; // sending email mail("sales@coremigration.com", "Website Document request", "{$content}","From: webmaster@coremigration.com"); } header("Location: http://www.coremigration.com/resources_thankyou.html"); exit; ?>
  12. Hey Anyone....I am having an issue with a form on my website that is supposed to email selected pdf files to a user when they select something, enter their email address and then hit submit. The "thank you" page appears when the submit button is clicked but nothing else happens. Any suggestions? Thanks
  13. Hi All, I am new to PHP and have a site that someone sent me to look at and I would like to set up a testing server in DW8. I have attempted to set everything up, but when I attempt to run it, all I see is the source code in the browser? Any help would be greatly appreciated.
×
×
  • 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.