Jump to content

NEED HELP WITH BACK BUTTON...


rsammy

Recommended Posts

i need help adding a BACK button in a php page. i just need to send control back to the previous page

this is the code for a Reply button on the page:

header("Location: compose.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&inboxcounter=".$_POST["inboxcounter"]."&sentcounter=".$_POST["sentcounter"]);

I just need to add another button - Back button and transfer control back to the previous page. how do i do that? i know there is a code like

javascript:window.history.back(-1)

but, how do i incorporate it in this code.

thanx in advance
Link to comment
https://forums.phpfreaks.com/topic/29763-need-help-with-back-button/
Share on other sites

[quote author=legendx link=topic=117677.msg480272#msg480272 date=1165464954]
<a href="<?=$_SERVER['HTTP_REFERER']?>">Back</a>

http://us3.php.net/manual/en/reserved.variables.php

Hope that helps.
[/quote]

thanx for replying, legendx. but, can u help me more? how can i use ur statement in my code? i'll have to use it in header...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.