Opening HTML Or PHP At Specific Spot

Opening A Web page At A Specific Spot

You probably have noticed that you had seen a website load that did not start at the top. Instead, it started somewhere in the middle. When you link to a page, or post a form with PHP, you can always specify where you want the top of the page. The link or code to start a page at a specific spot looks like http://excample.com/#article_id. The code below shows a couple of samples of how the codes will look as a link and a form post field in PHP.

HTML Link
<a href="http://example.com/#article_id">Link Text Here</a>

PHP Form

<html><body>
<div style=""><form method="post" action="<?php echo $_SERVER['PHP_SELF']."#article_id";?>" name="myform" >
<div style="float:left; "><textarea style="height:2000px; width:600px;" name="article">
Add text here.
</textarea></div>
<input type="hidden" name="hidden_name" value="" />
<div style="float:left; margin-top:20px; margin-left:10px;">
<input name="submit" style="display:visible; width="150" type="submit" value="Add Post" height="25" border="0" alt="Submit Form" /></div>
</form></div>
<div style="clear:both;"></div>
<div id="article_id">Here is the text at the top.<br/>Here is the text at the top.<br/>Here is the text at the top.<br/>Here is the text at the top.<br/>Here is the text at the top.<br/>Here is the text at the top.<br/>Here is the text at the top.<br/></div>
</body></html>