johnsheehan Posted February 22, 2013 Share Posted February 22, 2013 Hi, i am new to php and i am trying to build a contact form in xhtml and a action link to php. when i click the submit button on the form, i keep getting this message Fatal error: Call to undefined function check_input() in /home/beernice/public_html/truffles.php on line 6 the xhtml code is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Beer Nicessities-contactus</title> <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> <link href="sugar.css" rel="stylesheet" type="text/css"/> </head> <body> <div class="placement"></div> <div id="header">Welcome to Beer Niccessties.com</div> <div class="nav"> <a href="index.html">Home</a>| <a href="aboutus.html">About Us</a>| <a href="gallery.html">Gallery</a>| </div> <div id="content"> <p>Please contact us using the form below</p> <form action="truffles.php" method="post" class="contact"> <fieldset> <div> <label for="name" class="fixedwidth">Name:</label> <input type="text" name="name" id="name"/> </div> <div> <label for="email" class="fixedwidth">Email Address:</label> <input type="text" name="email" id="email"/> </div> <div> <label for="barberbok">Barber Bok</label> <input type="checkbox" name="options_0" id="barberbok" value=""/> <label for="ammount">ammount</label> <select name="ammount" id="ammount"> <option>5</option> <option>10</option> <option>15</option> <option>20</option> </select> </div> <br/> <div class="buttonarea"> <input type="submit" value="Submit Order" /> <input type="reset" value="reset" /> </div> </fieldset> </form> </div><!-- end of content div--> <div class="socialmedia"> <a href="http://twitter.com/sugarplumpdairy"><img src="images/twitter.png" title="By TwitterButtons.org" width="100" height="101" alt="follow us on twitter"/></a> <a href="http://facebook.com//pages/Sugarplumpdairy-beer-and-chocolate-truffles/142162515884033?ref=hl"><img src="images/facebook.png" title="By SocialMediaButtons.com" height="101" width="100" alt="like us on facebook"/></a> </div> <!--end of socialmedia--> </body> </html> and the php is as follows <?php /* Set e-mail recipient */ $myemail = "forlannumber10@hotmail.com"; $name = $_POST['name']; $email = $_POST['email']; $barberbok = $_POST['barberbok']; $ammount = $_POST['ammount']; ?> <DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR//xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://w3.org/1999.xhtml"> <head> <title>Beer Nicessities-thanks!</title> <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> <link href="sugar.css" rel="stylesheet" type="text/css"/> </head> <body> <div class="placement"></div> <div id="header">Welcome to Beer Niccessties.com</div> <div class="nav"> <a href="aboutus.html">About Us</a>| <a href="gallery.html">Gallery</a>| <a href="contactus.html">Contact Us</a>| </div> <div class="thanks"> <h1>Thank you for contacting us.</h1> <p>We will get back to you as soon as possible</p> </div> <div class="socialmedia"> <a href="http://twitter.com/sugarplumpdairy"><img src="images/twitter.png" title="By TwitterButtons.org" width="100" height="101" alt="follow us on twitter"/></a> <a href="http://facebook.com//pages/Sugarplumpdairy-beer-and-chocolate-truffles/142162515884033?ref=hl"><img src="images/facebook.png" title="By SocialMediaButtons.com" height="101" width="100"/></a> </div> <!--end of socialmedia--> </body> </html> what am i doing wrong? Please help! Quote Link to comment https://forums.phpfreaks.com/topic/274828-fatal-error-call-to-undefined-function-check_input/ Share on other sites More sharing options...
requinix Posted February 22, 2013 Share Posted February 22, 2013 (edited) Nothing you posted tries to call a check_input() function. You're not showing us the right code. [edit] Please use or [code=php:0] tags around your code. Makes things much easier to read. Edited February 22, 2013 by requinix Quote Link to comment https://forums.phpfreaks.com/topic/274828-fatal-error-call-to-undefined-function-check_input/#findComment-1414216 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.