Jump to content
Shermanator

this end tag has no matching start tag

Recommended Posts

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

Share this post


Link to post
Share on other sites

Just curious, does your webpage you complied run PHP code? If so, post your entire code.

Share this post


Link to post
Share on other sites

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>";}?>

Share this post


Link to post
Share on other sites

You need to execute the code on a server that runs PHP.

Share this post


Link to post
Share on other sites

Yeah, If you don't have PHP running, you'll get very weird errors on your webpage like the one you got.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...