Alex Rivera | Logout

Use Anchor after POST Form Submission

Asked 2011-11-10T12:34:32.730
9

I need to let the page loads at specific label within a page after user clicks the button Post.

Note: i'm using PHP

Form Code Sample:

<form action="po.php?id=44" method="POST">
   <input type="hidden" name="here" value="#here" />
   <input name="btn_send" type="submit" value="Post" />
</form>

The page should land somewhere in the page which has one title in between

as seen below

Code Sample:

<a name="here"></a>
<p>Total Number of Posts 55</p>

As you see, the place i land is a regular label text, not hyperlink. Therefore, i put the anchor line as an indicator just before the title.

Problem:

Page doesn't land where i put (name="here"). The page lands to the top. Is there easy way to make it land at ( name="here")?

Edit
Report

1 Answer

1
header("Location: url#fragment");
answered 2011-11-10T12:45:04.367

Your Answer