jayslo5 Posted May 18, 2008 Share Posted May 18, 2008 I'm making an email feedback form for a sales website. Problem is, when I click 'Submit', I get a blank page. ??? ??? ??? These are the source files: //samplerequest.html <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <form action="samples.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <table width="681" border="0"> <tr> <td width="20"><input type="checkbox" name="miniRail" id="miniRail" /></td> <td width="282"><label> Mini-Rail (9 mm rail base width, 97 mm rail length)</label></td> <td width="22"><label></label></td> <td width="339"> </td> </tr> </table> <table width="244" border="0"> <tr> <td width="20"> </td> <td width="20"><input type="checkbox" name="comSeriesMRE9" id="comSeriesMRE9" /></td> <td width="190">Commercial Series (MRE9)</td> </tr> <tr> <td> </td> <td><input type="checkbox" name="preSeriesMR9" id="preSeriesMR9" /></td> <td><label> Precision Series (MR9)</label></td> </tr> </table> <table width="743" border="0"> <tr> <td width="20"><input type="checkbox" name="dolphin" id="dolphin" /></td> <td width="713"><label> Dolphin 2-Piece Slides - 75 mm, 254 mm length rail, D075-254</label></td> </tr> </table> <table width="516" border="0"> <tr> <td width="20"><input type="checkbox" name="heviRail" id="heviRail" /></td> <td width="486"><label> Hevi-Rail (Combined roller bearing welded to plate HVB-054/HVP0, profile rolled channel rail, 4" length)</label></td> </tr> </table> <table width="472" border="0"> <tr> <td width="20"><input type="checkbox" name="rediRail" id="rediRail" /></td> <td width="442">Redi-Rail (RRS45 roller carriage, RR45-240 slide rail)</td> </tr> </table> <table width="105" border="0"> <tr> <td width="20"><label> <input type="checkbox" name="simplicity" id="simplicity" /> </label></td> <td width="75">Simplicity</td> </tr> </table> <table width="356" border="0"> <tr> <td width="20"> </td> <td width="20"><input type="checkbox" name="ceramicFL06" id="ceramicFL06" /></td> <td width="302"><label> Ceramic coated shaft (FL06, Inch Series)</label></td> </tr> <tr> <td> </td> <td><input type="checkbox" name="steelFL08" id="steelFL08" /></td> <td><label> Steel shaft (FL08, Inch Series)</label></td> </tr> <tr> <td> </td> <td><input type="checkbox" name="steelFM12" id="steelFM12" /></td> <td><label> Steel shaft (FM12, Metric Series)</label></td> </tr> </table> <label>Comments/Special Requests: <textarea name="comments" id="comments" cols="45" rows="5"></textarea> </label> <table cellspacing="0" cellpadding="0"> <tr> <td>Name:</td> <td><input name="name" size="40" value="" type="text" /></td> </tr> <tr> <td>*Company:</td> <td><input name="company" size="40" value="" type="text" /></td> </tr> <tr> <td>*Address:</td> <td><input name="address1" size="40" value="" type="text" /></td> </tr> <tr> <td>*City:</td> <td><input name="city" size="40" value="" type="text" /></td> </tr> <tr> <td>*State/Province:</td> <td><select name="state" size="1"> <option value="AZ">Arizona</option> <option value="AR">Arkansas</option> <option value="CA">California</option> <option value="CO">Colorado</option> <option value="CT">Connecticut</option> <option value="DE">Delaware</option> <option value="DC">District of Columbia</option> <option value="FL">Florida</option> <option value="GA">Georgia</option> <option value="HI">Hawaii</option> <option value="ID">Idaho</option> <option value="IL">Illinois</option> <option value="IN">Indiana</option> <option value="KS">Kansas</option> <option value="KY">Kentucky</option> <option value="LA">Louisiana</option> <option value="ME">Maine</option> <option value="MD">Maryland</option> <option value="MA">Massachusetts</option> <option value="MI">Michigan</option> <option value="MN">Minnesota</option> <option value="MS">Mississippi</option> <option value="MO">Missouri</option> <option value="MT">Montana</option> <option value="NE">Nebraska</option> <option value="NV">Nevada</option> <option value="NH">New Hampshire</option> <option value="NJ">New Jersey</option> <option value="NM">New Mexico</option> <option value="NY">New York</option> <option value="NC">North Carolina</option> <option value="ND">North Dakota</option> <option value="OH">Ohio</option> <option value="OK">Oklahoma</option> <option value="OR">Oregon</option> <option value="PA">Pennsylvania</option> <option value="RI">Rhode Island</option> <option value="SC">South Carolina</option> <option value="SD">South Dakota</option> <option value="TN">Tennessee</option> <option value="TX">Texas</option> <option value="UT">Utah</option> <option value="VA">Virginia</option> <option value="WA">Washington</option> <option value="WV">West Virginia</option> <option value="WI">Wisconsin</option> <option value="WY">Wyoming</option> <option value="IA">Iowa</option> </select> </td> </tr> <tr> <td>*ZIP: </td> <td><input name="zip" size="15" value="" type="text" /></td> </tr> <tr> <td>*Phone:</td> <td><input name="phone" size="25" value="" type="text" /></td> </tr> <tr> <td> Fax:</td> <td><input name="fax" size="25" value="" type="text" /></td> </tr> <tr> <td>*Email:</td> <td><input name="email" size="40" value="" type="text" /></td> </tr> </table> <table width="339" border="0"> <tr> <td width="117"> </td> <td width="212"><label> <input type="submit" name="submit" id="submit" value="Submit" /> </label></td> </tr> </table> <p> </p> </form> </body> </html> AND //samples.php <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <?php echo 'email sent.'; $name = $_POST['name'] ; $company = $_POST['company'] ; $address1 = $_POST['address1'] ; $city = $_POST['city'] ; $state = $_POST['state'] ; $zip = $_POST['zip'] ; $phone = $_POST['phone'] ; $fax = $_POST['fax'] ; $email = $_POST['email'] ; $miniRail = $_POST['miniRail'] ; $comSeriesMRE9 = $_POST['comSeriesMRE9'] ; $preSeriesMR9 = $_POST['preSeriesMR9'] ; $dolphin = $_POST['dolphin'] ; $heviRail = $_POST['heviRail'] ; $rediRail = $_POST['rediRail'] ; $simplicity = $_POST['simplicity'] ; $ceramicFL06 = $_POST['ceramicFL06'] ; $steelFL08 = $_POST['steelFL08'] ; $steelFM12 = $_POST['steelFM12'] ; $comments = $_POST['comments'] ; $message = "Name: ".$name." Company: ".$company." Address: ".$address1." City: ".$city." State: ".$state." Zip: ".$zip." Phone: ".$phone." Fax: ".$fax." Email: "$email." Mini-Rail: ".miniRail." Commerical Series MRE9: ".$comSeriesMRE9." Precision Series MR9: ".$preSeriesMR9." Dolphin: ".$dolphin." Hevi-Rail: ".$heviRail." Redi-Rail: ".$rediRail." Simplicity: ".$simplicity." Ceramic FL06: ".ceramicFL06." Steel FL08: ".steelFL08." Steel FM12: ".steelFM12." Comments: ".$comments." "; mail( "jonslominski@comcast.net", "Subject: G2 Motion Sample", $message, $email ); echo "Thank you for using our mail form"; ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
phpzone Posted May 18, 2008 Share Posted May 18, 2008 anthony@darkstar:~$ php -l temp2.php PHP Parse error: syntax error, unexpected T_VARIABLE in temp2.php on line 254 Errors parsing temp2.php You have an error. Probably a missing quote or something. Quote Link to comment Share on other sites More sharing options...
runnerjp Posted May 18, 2008 Share Posted May 18, 2008 please wrap code in the code tags without the here you go <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <form action="samples.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <table width="681" border="0"> <tr> <td width="20"><input type="checkbox" name="miniRail" id="miniRail" /></td> <td width="282"><label> Mini-Rail (9 mm rail base width, 97 mm rail length)</label></td> <td width="22"><label></label></td> <td width="339"> </td> </tr> </table> <table width="244" border="0"> <tr> <td width="20"> </td> <td width="20"><input type="checkbox" name="comSeriesMRE9" id="comSeriesMRE9" /></td> <td width="190">Commercial Series (MRE9)</td> </tr> <tr> <td> </td> <td><input type="checkbox" name="preSeriesMR9" id="preSeriesMR9" /></td> <td><label> Precision Series (MR9)</label></td> </tr> </table> <table width="743" border="0"> <tr> <td width="20"><input type="checkbox" name="dolphin" id="dolphin" /></td> <td width="713"><label> Dolphin 2-Piece Slides - 75 mm, 254 mm length rail, D075-254</label></td> </tr> </table> <table width="516" border="0"> <tr> <td width="20"><input type="checkbox" name="heviRail" id="heviRail" /></td> <td width="486"><label> Hevi-Rail (Combined roller bearing welded to plate HVB-054/HVP0, profile rolled channel rail, 4" length)</label></td> </tr> </table> <table width="472" border="0"> <tr> <td width="20"><input type="checkbox" name="rediRail" id="rediRail" /></td> <td width="442">Redi-Rail (RRS45 roller carriage, RR45-240 slide rail)</td> </tr> </table> <table width="105" border="0"> <tr> <td width="20"><label> <input type="checkbox" name="simplicity" id="simplicity" /> </label></td> <td width="75">Simplicity</td> </tr> </table> <table width="356" border="0"> <tr> <td width="20"> </td> <td width="20"><input type="checkbox" name="ceramicFL06" id="ceramicFL06" /></td> <td width="302"><label> Ceramic coated shaft (FL06, Inch Series)</label></td> </tr> <tr> <td> </td> <td><input type="checkbox" name="steelFL08" id="steelFL08" /></td> <td><label> Steel shaft (FL08, Inch Series)</label></td> </tr> <tr> <td> </td> <td><input type="checkbox" name="steelFM12" id="steelFM12" /></td> <td><label> Steel shaft (FM12, Metric Series)</label></td> </tr> </table> <label>Comments/Special Requests: <textarea name="comments" id="comments" cols="45" rows="5"></textarea> </label> <table cellspacing="0" cellpadding="0"> <tr> <td>Name:</td> <td><input name="name" size="40" value="" type="text" /></td> </tr> <tr> <td>*Company:</td> <td><input name="company" size="40" value="" type="text" /></td> </tr> <tr> <td>*Address:</td> <td><input name="address1" size="40" value="" type="text" /></td> </tr> <tr> <td>*City:</td> <td><input name="city" size="40" value="" type="text" /></td> </tr> <tr> <td>*State/Province:</td> <td><select name="state" size="1"> <option value="AZ">Arizona</option> <option value="AR">Arkansas</option> <option value="CA">California</option> <option value="CO">Colorado</option> <option value="CT">Connecticut</option> <option value="DE">Delaware</option> <option value="DC">District of Columbia</option> <option value="FL">Florida</option> <option value="GA">Georgia</option> <option value="HI">Hawaii</option> <option value="ID">Idaho</option> <option value="IL">Illinois</option> <option value="IN">Indiana</option> <option value="KS">Kansas</option> <option value="KY">Kentucky</option> <option value="LA">Louisiana</option> <option value="ME">Maine</option> <option value="MD">Maryland</option> <option value="MA">Massachusetts</option> <option value="MI">Michigan</option> <option value="MN">Minnesota</option> <option value="MS">Mississippi</option> <option value="MO">Missouri</option> <option value="MT">Montana</option> <option value="NE">Nebraska</option> <option value="NV">Nevada</option> <option value="NH">New Hampshire</option> <option value="NJ">New Jersey</option> <option value="NM">New Mexico</option> <option value="NY">New York</option> <option value="NC">North Carolina</option> <option value="ND">North Dakota</option> <option value="OH">Ohio</option> <option value="OK">Oklahoma</option> <option value="OR">Oregon</option> <option value="PA">Pennsylvania</option> <option value="RI">Rhode Island</option> <option value="SC">South Carolina</option> <option value="SD">South Dakota</option> <option value="TN">Tennessee</option> <option value="TX">Texas</option> <option value="UT">Utah</option> <option value="VA">Virginia</option> <option value="WA">Washington</option> <option value="WV">West Virginia</option> <option value="WI">Wisconsin</option> <option value="WY">Wyoming</option> <option value="IA">Iowa</option> </select> </td> </tr> <tr> <td>*ZIP: </td> <td><input name="zip" size="15" value="" type="text" /></td> </tr> <tr> <td>*Phone:</td> <td><input name="phone" size="25" value="" type="text" /></td> </tr> <tr> <td> Fax:</td> <td><input name="fax" size="25" value="" type="text" /></td> </tr> <tr> <td>*Email:</td> <td><input name="email" size="40" value="" type="text" /></td> </tr> </table> <table width="339" border="0"> <tr> <td width="117"> </td> <td width="212"><label> <input type="submit" name="submit" id="submit" value="Submit" /> </label></td> </tr> </table> <p> </p> </form> </body> </html> AND //samples.php <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <?php echo 'email sent.'; $name = $_POST['name'] ; $company = $_POST['company'] ; $address1 = $_POST['address1'] ; $city = $_POST['city'] ; $state = $_POST['state'] ; $zip = $_POST['zip'] ; $phone = $_POST['phone'] ; $fax = $_POST['fax'] ; $email = $_POST['email'] ; $miniRail = $_POST['miniRail'] ; $comSeriesMRE9 = $_POST['comSeriesMRE9'] ; $preSeriesMR9 = $_POST['preSeriesMR9'] ; $dolphin = $_POST['dolphin'] ; $heviRail = $_POST['heviRail'] ; $rediRail = $_POST['rediRail'] ; $simplicity = $_POST['simplicity'] ; $ceramicFL06 = $_POST['ceramicFL06'] ; $steelFL08 = $_POST['steelFL08'] ; $steelFM12 = $_POST['steelFM12'] ; $comments = $_POST['comments'] ; $message = "Name: ".$name." Company: ".$company." Address: ".$address1." City: ".$city." State: ".$state." Zip: ".$zip." Phone: ".$phone." Fax: ".$fax." Email: ".$email." Mini-Rail: ".miniRail." Commerical Series MRE9: ".$comSeriesMRE9." Precision Series MR9: ".$preSeriesMR9." Dolphin: ".$dolphin." Hevi-Rail: ".$heviRail." Redi-Rail: ".$rediRail." Simplicity: ".$simplicity." Ceramic FL06: ".ceramicFL06." Steel FL08: ".steelFL08." Steel FM12: ".steelFM12." Comments: ".$comments." "; mail( "jonslominski@comcast.net", "Subject: G2 Motion Sample", $message, $email ); echo "Thank you for using our mail form"; ?> </body> </html> you just missed a . in Email: "this dot--->.$email." Quote Link to comment Share on other sites More sharing options...
phpzone Posted May 18, 2008 Share Posted May 18, 2008 So easy to miss Take a look at HEREDOC, I swear by it Quote Link to comment Share on other sites More sharing options...
runnerjp Posted May 18, 2008 Share Posted May 18, 2008 haha i miss this stuff in my codes all the time and can NEVER find them untill someone points out how easy it is lol Quote Link to comment Share on other sites More sharing options...
jayslo5 Posted May 18, 2008 Author Share Posted May 18, 2008 Thank you so much. So stupid when its a little mistake like ONE PERIOD. Thanks again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.