I've got an html5 page with a php form in it and I'm getting a few errors. When initially developing, the form, by itself on a page, validated 100% HTML5 (named index.php). The page I put it into (index.html) also validated 100%. Copying the form's code into my page has caused a few validation errors.. which doesn't make sense to me, as they were both 100% accurate.
I'm not sure whether the page including the form should now be index.php or stay as index.html.
Advice?
Below is the HTML and Validation errors as .HTML and .PHP
HTML:
<body>
<div id="vig"></div>
<header>
<h1>LARA</h1>
</header>
<div id="main" class="corners" role="main">
<div id="jquery_jplayer_1" class="jp-jplayer"></div>
<div class="jp-audio">
<div class="jp-type-playlist">
<div id="jp_interface_1" class="jp-interface">
<ul class="jp-controls">
<li><a href="#" class="jp-previous blue" tabindex="1">previous</a></li>
<li><a href="#" class="blue jp-play" tabindex="1">play</a></li>
<li><a href="#" class="blue jp-pause" tabindex="1">pause</a></li>
<li><a href="#" class="blue jp-stop" tabindex="1">stop</a></li>
<li><a href="#" class="blue jp-next" tabindex="1">next</a></li>
</ul>
<div class="jp-progress corners">
<div class="jp-seek-bar corners blue">
<div class="jp-play-bar corners"></div>
</div>
</div>
<div class="time">
<div class="jp-current-time"></div>
<p id="name"></p>
<div class="jp-duration"></div>
</div>
</div>
</div>
</div>
<div id="mail">
<form id="signup" action="<?=$_SERVER['PHP_SELF']; ?>" method="get">
<fieldset>
<input type="email" name="email" id="email" class="corners" placeholder="Enter your email address" />
<span id="response">
<? require_once('php/store-address.php'); if($_GET['submit']){ echo storeAddress(); } ?>
</span>
<input type="submit" id="submit" class="corners blue" value="Go" />
</fieldset>
</form>
</div>
</div>
<footer>
</footer>
</body>
as .HTML these errors show up:
Line 67, Column 73: Bad value <?=$_SERVER['PHP_SELF']; ?> for attribute action on element form: Illegal character in query component.
<form id="signup" action="<?=$_SERVER['PHP_SELF']; ?>" method="get">
Syntax of IRI reference:
Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.
Line 71, Column 7: Saw <?. Probable cause: Attempt to use an XML processing instruction in HTML. (XML processing instructions are not supported in HTML.)
<? require_once('php/store-address.php'); if($_GET['submit']){ echo storeA…
as .PHP these errors show up:
Line 74, Column 276: End of file seen and there were open elements.
…s/c09/h02/mnt/127740/domains/lara.fm/html/index.php</b> on line <b>71</b><br />
✉
Line 70, Column 23: Unclosed element span.
<span id="response">
✉
Line 68, Column 14: Unclosed element fieldset.
<fieldset>
✉
Line 67, Column 56: Unclosed element form.
<form id="signup" action="/index.php" method="get">
✉
Line 66, Column 21: Unclosed element div.
<div id="mail">
✉
Line 41, Column 47: Unclosed element div.
<div id="main" class="corners" role="main">
✉
Line 36, Column 22: Unclosed element div.
<div id="container">