esutick Posted October 7, 2011 Share Posted October 7, 2011 Ok, I just got an xhtml file of my friend, I'm supposed to put in a website, But it's not working... I have no idea about PHP (not a single idea) and my friend isn't picking up his phone and responsing to mail, so I hope any of you guys can help me. 1. no .PHP file is included (not sure if it's supposed to) 2. the error I get is : This page contains the following errors: error on line 59 at column 21: Unescaped '<' not allowed in attributes values Below is a rendering of the page up to the first error. 3 This is my xhtml code": <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Aanmeld pagina</title> <style type="text/css"> #wrapper { text-align: left; width: 980px; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; } form { left: 45px; } h1 { position: fixed; top: 150px; left: 45px; font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; color: #883493; padding-left: 10px; } .p2tag { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; position: fixed; top: 330px; color: #7d7d7d; font-weight: bold; left: 55px; border-bottom-style: dotted; padding-bottom: 10px; } input { left: 20px; } label { left: 45px; } .p1tag { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; color: #7d7d7d; position: fixed; left: 55px; top: 300px; font-style: normal; padding-top: 100px; font-weight: normal; } </style> </head> <body> <h1>Aanmelden voor nieuwsbrief</h1> <p><span class="p2tag"> Wilt u op de hoogte blijven van de nieuwste ontwikkelingen van No issue?<br /> Meld u dan aan door dit formulier in te vullen.</span> <p/><span class="p1tag"> <form method="post" action="<?php echo $PHP_SELF;?>"> <form action="http://www.noissue.nl/aanmelden" method="post" class="ft"> <table> <colgroup><col align="right"></col><col align="left"></col></colgroup> <tr><th>Naam:</th> <td><input type="text" name="naam" value="" title="naam"><td></tr> <tr><th>Telefoon nummer:</th> <td><input type="text" name="telefoon" title="telefoon"></td></tr> <tr><th>Email:</th> <td><input type="text" name="email" title="email"><td></tr> <tr><td></td><td><input type="submit" value="Send"></td></tr> </table> </form> </span> </body> </html> It's a form to subsribe to a newsletter, Hope anyone of you can help me on installing this? |Thanks in advance!| Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted October 7, 2011 Share Posted October 7, 2011 Where is this error coming from? Quote Link to comment Share on other sites More sharing options...
esutick Posted October 7, 2011 Author Share Posted October 7, 2011 rule 59 <form method="post" action="<?php echo $PHP_SELF;?>"> I think I'm missing a .php file.... but i'm not sure... Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted October 7, 2011 Share Posted October 7, 2011 No, I mean how did you discover the error, not where is it in the file . . . Quote Link to comment Share on other sites More sharing options...
esutick Posted October 7, 2011 Author Share Posted October 7, 2011 I discovered it when I tried previewing the file in Chrome and then in IE. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted October 7, 2011 Share Posted October 7, 2011 What is the filename? Is it a .php file, or is the extension something else? Most often php will only be parsed by the webserver if the file extension is .php, or .phtml. In any case, change the <form tag to: action="" and try it that way. There's no reason to use that php variable for a form action anyhow. Quote Link to comment Share on other sites More sharing options...
esutick Posted October 7, 2011 Author Share Posted October 7, 2011 So I change <form method"" to <action method"" ? And the file is .html Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted October 7, 2011 Share Posted October 7, 2011 No, <form method="post" action="">. Essentially, just remove the php code from it entirely. Quote Link to comment Share on other sites More sharing options...
esutick Posted October 7, 2011 Author Share Posted October 7, 2011 Thank you! only now i'm getting a new error This page contains the following errors: error on line 65 at column 46: Opening and ending tag mismatch: td line 0 and tr Below is a rendering of the page up to the first error. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted October 7, 2011 Share Posted October 7, 2011 Post your current code . . . Quote Link to comment Share on other sites More sharing options...
esutick Posted October 7, 2011 Author Share Posted October 7, 2011 I forgot to save it as a php .__." One question, where does the form data send to? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted October 7, 2011 Share Posted October 7, 2011 I just noticed you have nested 2 <form> tags. That isn't valid markup. But to answer your question contingent on fixing that problem, if it has action="", it will submit to itself, otherwise to whatever URL is specified in the action= attribute. Quote Link to comment Share on other sites More sharing options...
haku Posted October 11, 2011 Share Posted October 11, 2011 Your original problem was this: <form method="post" action="<?php echo $PHP_SELF;?>"> You have an extra greater than symbol (>) in there, after the semi colon. Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted October 11, 2011 Share Posted October 11, 2011 Your original problem was this: <form method="post" action="<?php echo $PHP_SELF;?>"> You have an extra greater than symbol (>) in there, after the semi colon. looks to me like there should be two ">" there.. one closes the PHP and the other closes the form tag.. 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.