Shermanator Posted January 26, 2012 Share Posted January 26, 2012 While I'm sure the solution is staring me dead in the face I cannot see it. Offending code is as follows..."<form method='post' action='mailform.php'> Email: <input name='email' type='text' /><br /> Subject: <input name='subject' type='text' /><br /> Message:<br /> <textarea name='message' rows='15' cols='40'> </textarea><br /> <input type='submit' value='Submit' /></form>";}?>when compiled onto a web page the "submit button" is followed by ";?> it's just a copied version of the form at http://www.w3schools.com/php/php_mail.asp Link to comment Share on other sites More sharing options...
Err Posted January 26, 2012 Share Posted January 26, 2012 Just curious, does your webpage you complied run PHP code? If so, post your entire code. Link to comment Share on other sites More sharing options...
Shermanator Posted January 26, 2012 Author Share Posted January 26, 2012 per your request...<?phpif (isset($_REQUEST['email'])) { //send email mail("joshua-sherman@live.com", $subject, $message, "From:" . $email); $email = $_REQUEST['email'] ; $subject = $_REQUEST['subject'] ; $message = $_REQUEST['message'] ; echo "Thank you for using our mail form"; }else { echo "<form method='post' action='mailform.php'> Email: <input name='email' type='text' /><br /> Subject: <input name='subject' type='text' /><br /> Message:<br /> <textarea name='message' rows='15' cols='40'> </textarea><br /> <input type='submit' value='Submit' /></form>";}?> Link to comment Share on other sites More sharing options...
Shermanator Posted January 26, 2012 Author Share Posted January 26, 2012 did you also mean ENTIRE page's code, or just where the php is involved? Link to comment Share on other sites More sharing options...
Ingolme Posted January 26, 2012 Share Posted January 26, 2012 You need to execute the code on a server that runs PHP. Link to comment Share on other sites More sharing options...
Err Posted January 26, 2012 Share Posted January 26, 2012 Yeah, If you don't have PHP running, you'll get very weird errors on your webpage like the one you got. Link to comment Share on other sites More sharing options...
Shermanator Posted January 26, 2012 Author Share Posted January 26, 2012 running through GoDaddy. Maybe I have been assuming it has php because it does brag about it, but am currently checking the server. Link to comment Share on other sites More sharing options...
Shermanator Posted January 26, 2012 Author Share Posted January 26, 2012 more over, the problem i am experiencing seems less to do with the php and more to do with the form tags in the html itself. Link to comment Share on other sites More sharing options...
Ingolme Posted January 26, 2012 Share Posted January 26, 2012 Remember to save your file with a .php extension. The problem has to do with PHP because the PHP is appearing in your source code when it shouldn't. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.