budimir Posted January 31, 2008 Share Posted January 31, 2008 Hi Guys, I need help with header. I have a page on which I'm deleting multiplie records using checkbox. So I'd like to use header to get back to that same page after deleting all the records that I have checked. How do I use that? header("Location:pregled.phpXXXXXX"); Quote Link to comment https://forums.phpfreaks.com/topic/88760-solved-header-problem/ Share on other sites More sharing options...
revraz Posted January 31, 2008 Share Posted January 31, 2008 Probably be easier to use a redirect, if you are sending output to the browser. Quote Link to comment https://forums.phpfreaks.com/topic/88760-solved-header-problem/#findComment-454630 Share on other sites More sharing options...
budimir Posted January 31, 2008 Author Share Posted January 31, 2008 Probably be easier to use a redirect, if you are sending output to the browser. Could you explain it a little bit...? The situation is. I have deleted 4 records and now I would like to go back to page where I have deleted these 4 records and see the rest. Quote Link to comment https://forums.phpfreaks.com/topic/88760-solved-header-problem/#findComment-454636 Share on other sites More sharing options...
max_w1 Posted January 31, 2008 Share Posted January 31, 2008 use this header ('Location: /#'); Quote Link to comment https://forums.phpfreaks.com/topic/88760-solved-header-problem/#findComment-454644 Share on other sites More sharing options...
max_w1 Posted January 31, 2008 Share Posted January 31, 2008 OOPS!!! i am sorry use this header: header ('Location: #'); please let me know if that was helpful... Quote Link to comment https://forums.phpfreaks.com/topic/88760-solved-header-problem/#findComment-454652 Share on other sites More sharing options...
budimir Posted January 31, 2008 Author Share Posted January 31, 2008 OOPS!!! i am sorry use this header: header ('Location: #'); please let me know if that was helpful... I'm sorry. It didn't help. And the reason is: I'm using a form and calling delete_page.php. In delete_page.php I need to put header to take me back to page from which I called delete_page.php. The header you posted here is directing to itself. Quote Link to comment https://forums.phpfreaks.com/topic/88760-solved-header-problem/#findComment-454658 Share on other sites More sharing options...
themistral Posted January 31, 2008 Share Posted January 31, 2008 What about header ('Location:'.$_SERVER['HTTP_REFERER']) Quote Link to comment https://forums.phpfreaks.com/topic/88760-solved-header-problem/#findComment-454662 Share on other sites More sharing options...
budimir Posted January 31, 2008 Author Share Posted January 31, 2008 What about header ('Location:'.$_SERVER['HTTP_REFERER']) THAT'S IT!!!!! Thanks a lot!!!!!!! Quote Link to comment https://forums.phpfreaks.com/topic/88760-solved-header-problem/#findComment-454668 Share on other sites More sharing options...
max_w1 Posted January 31, 2008 Share Posted January 31, 2008 then you must use this: header ('Location: ./'); Quote Link to comment https://forums.phpfreaks.com/topic/88760-solved-header-problem/#findComment-454671 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.