ublapach Posted October 16, 2008 Share Posted October 16, 2008 ok heres the page im building and the errors are at the bottom http://ceiscorp.com/newsite and heres the code i have for the page <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTDjavascript:void(0); XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <?PHP require_once("db_connx.php"); $sql="SELECT * FROM bidrequests;"; $result= @mysql_query($sql); if (@$_POST['co_name'] == "" && @$_POST['op']=="ds"){ $co_name_err = "<font color=red>Please Enter Your Company Name!</font><br/>"; $send = "no"; } if (@$_POST['first_name'] == "" && @$_POST['op']=="ds"){ $first_name_err = "<font color=red>Please Enter Your First Name!</font><br/>"; $send = "no"; } if (@$_POST['last_name'] == "" && @$_POST['op']=="ds"){ $last_name_err = "<font color=red>Please Enter Your Last Name!</font><br/>"; $send = "no"; } if (@$_POST['email'] == "" && @$_POST['op']=="ds"){ $email_err = "<font color=red>Please Enter an Email Address!</font><br/>"; $send = "no"; } if (@$_POST['areacode'] == "" && @$_POST['op']=="ds"){ $areacode_err = "<font color=red>Please Enter the Area Code of Your Phone Number!</font><br/>"; $send = "no"; } if (@$_POST['first3'] == "" && @$_POST['op']=="ds"){ $first3_err = "<font color=red>Please Enter the First Three Digits of Your Phone Number!</font><br/>"; $send = "no"; } if (@$_POST['last4'] == "" && @$_POST['op']=="ds"){ $last4_err = "<font color=red>Please Enter the Last Four Digits of Your Phone Number!</font><br/>"; $send = "no"; } if (@$_POST['job_desc'] == "" && @$_POST['op']=="ds"){ $job_desc_err = "<font color=red>Please Enter a Breif Desciption of the Job!</font><br/>"; $send = "no"; } if (@$_POST['city'] == "" && @$_POST['op']=="ds"){ $city_err = "<font color=red>Please Enter The City Where Your Company Is Located!</font><br/>"; $send = "no"; } if (@$_POST['state'] == "Initial" && @$_POST['op']=="ds"){ $state_err = "<font color=red>Please Select the State Where Your Company Is Located!</font><br/>"; $send = "no"; } if (@$_POST['zipcode'] == "" && @$_POST['op']=="ds"){ $zipcode_err = "<font color=red>Please Enter a Zip Code!</font><br/>"; $send = "no"; } ?> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-2" /> <meta name="author" content="Luka Cvrk (www.solucija.com)" /> <link rel="stylesheet" href="newsite/style.css" type="text/css" /> <title>CEIS/TECHSICO</title> </head> <body> <div id="content"> <div id="header"> <div id="logo"> <img src="newsite/images/techsico banner.gif" height="235" width="900" align="middle" /></div> <div id="tabs"> <ul> <li><a href="index.php" >Home</a></li> <li><a href="devisions.htm">Devisions</a></li> <li><a href="products.htm">Products</a></li> <li><a href="engproc.htm">Engineering</a></li> <li><a href="newsite/tracking/bidrequest2.php" class="current">Bid Form</a></li> <li></li> <li></li> <li><a href="staff.htm" >Staff</a></li> <li><a href="contact.htm" >Contact Us</a></li> </ul> <div id="search"> </div> </div> <div class="left"> <div class="left_articles"> <p> <?php $form_block = " <form id=\"bidrequest\" name=\"form1\" method=\"POST\" action=\"$PHP_SELF\"> <label> <h1>Information About You and Your Company </h1> <hr /> <h2>Company Name: <input type=\"text\" name=\"co_name\" tabindex=\"1\" size=\"50\" align=\"right\" value=\"" .@$_POST['co_name']. "\" /> <br/> ".@$co_name_err." <br /> <br /> First Name: <input type=\"text\" name=\"first_name\" tabindex=\"2\" value=\"" .@$_POST['first_name']. "\" /> <br/>".@$first_name_err." </h2> <h2> Last Name: <input type=\"text\" name=\"last_name\" tabindex=\"3\" value=\"" .@$_POST['last_name']. "\" /><br/>".@$last_name_err." </label> </h2> <h2> <label> E-mail Address: </label> <input type=\"text\" name=\"email\" tabindex=\"4\" value=\"" .@$_POST['email']. "\" /><br/>".@$email_err." <label><br /> <br /> Phone Number: ( <input type=\"text\" name=\"areacode\" size=\"3\" maxlength=\"3\" tabindex=\"5\" value=\"" .@$_POST['areacode']. "\" /> ) <input type=\"text\" name=\"first3\" size=\"3\" maxlength=\"3\" tabindex=\"6\" value=\"" .@$_POST['first3']. "\" /> - <input type=\"text\" name=\"last4\" size=\"4\" maxlength=\"4\" tabindex=\"7\" value=\"" .@$_POST['last4']. "\" /><br/>".@$areacode_err."<br/>".@$first3_err."<br/> ".@$last4_err." </label> <br /> <br /> </h2> <h1>Job Details</h1><br /><hr /> <br /> <label> <h2>Job Description: <br/> <input type=\"text\" name=\"job_desc\" size=\"50\" value=\"" .@$_POST['job_desc']. "\" /><br/>".@$job_desc_err." <br /> <br /> Job Location: (City) <input type=\"text\" name=\"city\" size=\"15\" value=\"" .@$_POST['city']. "\"/><br/>".@$city_err."<br/> (state) <select name=\"state\" value=\"" .@$_POST['state']. "\" id=\"state\"><br/>".@$state_err." <option value=\"Intial\">Please Select State</option> <option value=\"".@$_POST['state']."\">" .@$_POST['state']." </option> <option value=\"AK\">AK - Alaska</option> <option value=\"AL\">AL - Alabama</option> <option value=\"AR\">AR - Arkansas</option> <option value=\"AZ\">AZ - Arizona</option> <option value=\"CA\">CA - California</option> <option value=\"CO\">CO - Colorado</option> <option value=\"CT\">CT - Connecticut</option> <option value=\"DC\">DC - Dist of Columbia</option> <option value=\"DE\">DE - Delaware</option> <option value=\"FL\">FL - Florida</option> <option value=\"GA\">GA - Georgia</option> <option value=\"HI\">HI - Hawaii</option> <option value=\"IA\">IA - Iowa</option> <option value=\"ID\">ID - Idaho</option> <option value=\"IL\">IL - Illinois</option> <option value=\"IN\">IN - Indiana</option> <option value=\"KS\">KS - Kansas</option> <option value=\"KY\">KY - Kentucky</option> <option value=\"LA\">LA - Louisiana</option> <option value=\"MA\">MA - Massachusetts</option> <option value=\"MD\">MD - Maryland</option> <option value=\"ME\">ME - Maine</option> <option value=\"MI\">MI - Michigan</option> <option value=\"MN\">MN - Minnesota</option> <option value=\"MO\">MO - Missouri</option> <option value=\"MS\">MS - Mississippi</option> <option value=\"MT\">MT - Montana</option> <option value=\"NC\">NC - North Carolina</option> <option value=\"ND\">ND - North Dakota</option> <option value=\"NE\">NE - Nebraska</option> <option value=\"NH\">NH - New Hampshire</option> <option value=\"NJ\">NJ - New Jersey</option> <option value=\"NM\">NM - New Mexico</option> <option value=\"NV\">NV - Nevada</option> <option value=\"NY\">NY - New York</option> <option value=\"OH\">OH - Ohio</option> <option value=\"OK\">OK - Oklahoma</option> <option value=\"OR\">OR - Oregon</option> <option value=\"PA\">PA - Pennsylvania</option> <option value=\"RI\">RI - Rhode Island</option> <option value=\"SC\">SC - South Carolina</option> <option value=\"SD\">SD - South Dakota</option> <option value=\"TN\">TN - Tennessee</option> <option value=\"TX\">TX - Texas</option> <option value=\"UT\">UT - Utah</option> <option value=\"VA\">VA - Virginia</option> <option value=\"VT\">VT - Vermont</option> <option value=\"WA\">WA - Washington</option> <option value=\"WI\">WI - Wisconsin</option> <option value=\"WV\">WV - West Virginia</option> <option value=\"WY\">WY - Wyoming</option> </select><br /><br/> Zipcode:<br/> <input type=\"text\" name=\"zipcode\" value=\"" .@$_POST['zipcode']."\" /><br/>".@$zipcode_err." <br /><br/> Attach a more detailed description:<br /> <input type=\"file\" name=\"file1\" value=\"".@$_POST['file1']."\" /> <br /> <input type=\"file\" name=\"file2\" value=\"".@$_POST['file2']."\" /> <br /> Additional Comments:<br /> <textarea rows=\"10\" name=\"details\" cols=\"65\"></textarea> </h2> <input type=\"hidden\" name=\"op\" value=\"ds\"> <input type=\"submit\" name=\"submit\" value=\"Submit Bid Request\"> <input name=\"reset\" type=\"reset\" id=\"reset\" value=\"Reset Form\"> </form>" ?> <?PHP if(@$_POST['op'] !="ds"){ echo $form_block; } else if (@$_POST['op']=="ds"){ if(@$send !="no"){ $sqlinsert = "INSERT INTO bidrequests (co_name, first_name, last_name, email, phone, job_desc, city, state, file1, file2, details) VALUES ('$_POST[co_name]', '$_POST[first_name]', '$_POST[last_name]', '$_POST[email]', '$_POST[areacode]'"."'$_POST[first3]'"."'$_POST[last4]', '$_POST[job_desc]','$_POST[city]', '$_POST[state]', '$_POST[file1]','$_POST[file2]','$_POST[details]')"; $resultlog = mysql_query($sqlinsert); echo "Your Request has Been Processed Please Wait 2 to 3 days For a Phone Call or an Email Reply!"; } if(@$send =="no"){ echo $form_block;} } ?> </p> </div> </div> <div id="right"> <div class="boxtop"> <div class="boxtop"></div> <div class="box"> <p>To Tack a job <a href="index.php">click here</a> </p> <p></p> </div> </div> <p> </div> <!--<div class="boxtop"></div> <div class="box"> <p>News Can Go Here!</p> </div>--> </div> <div class="footer"> <?php $phone = "$areacode, $first3, $last4"; $subject = "Bid from Online form from $co_name"; $contents= "$co_name, $first_name, $last_name, $email, $phone, $job_desc, $city, $state, $zipcode, $details"; $to = "ublapach@gmail.com"; $from_header = "From: $email"; if(@$_POST['op']=="ds") { mail($to, $subject, $contents, $from_header); } else { print("<HTML><BODY>Error, no comments were submitted!"); print("</BODY></HTML>"); } ?> <p>© <a href="mailto:ublapach@gmail.com">Michael LaPach</a></p> </div> </div> </body> </html> i just want to know how to get rid of the errors at the bottom Quote Link to comment https://forums.phpfreaks.com/topic/128736-errors-dont-know-how-to-not-show-them-of-page/ Share on other sites More sharing options...
Maq Posted October 16, 2008 Share Posted October 16, 2008 ok heres the page im building and the errors are at the bottom http://ceiscorp.com/newsite I don't see any errors... ??? Quote Link to comment https://forums.phpfreaks.com/topic/128736-errors-dont-know-how-to-not-show-them-of-page/#findComment-667216 Share on other sites More sharing options...
ublapach Posted October 16, 2008 Author Share Posted October 16, 2008 oh my bad thats cause it not on that page it on this one http://ceiscorp.com/newsite/bidrequest.php Quote Link to comment https://forums.phpfreaks.com/topic/128736-errors-dont-know-how-to-not-show-them-of-page/#findComment-667218 Share on other sites More sharing options...
Maq Posted October 16, 2008 Share Posted October 16, 2008 These variables are never defined, did you mean to use $_POST['co_name']? $contents= "$co_name, $first_name, $last_name, $email, $phone, $job_desc, $city, $state, $zipcode, $details"; Quote Link to comment https://forums.phpfreaks.com/topic/128736-errors-dont-know-how-to-not-show-them-of-page/#findComment-667230 Share on other sites More sharing options...
Maq Posted October 16, 2008 Share Posted October 16, 2008 Same with line 247... $phone = "$areacode, $first3, $last4"; Quote Link to comment https://forums.phpfreaks.com/topic/128736-errors-dont-know-how-to-not-show-them-of-page/#findComment-667233 Share on other sites More sharing options...
ublapach Posted October 16, 2008 Author Share Posted October 16, 2008 is there a way the silence the errors that show up even after i fix this code? Quote Link to comment https://forums.phpfreaks.com/topic/128736-errors-dont-know-how-to-not-show-them-of-page/#findComment-667274 Share on other sites More sharing options...
Maq Posted October 16, 2008 Share Posted October 16, 2008 Yeah, in your .ini file you can turn display errors off, I don't remember off the top of my head. Quote Link to comment https://forums.phpfreaks.com/topic/128736-errors-dont-know-how-to-not-show-them-of-page/#findComment-667290 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.