session variables - PHP HTTP_REFERRER - how to detect last page? -
I need to figure out where the user has just clicked - as my AJAX content is from the source page It is required to display differently depending on the basis
If it is to go to about.php, then it needs to be the data only, but if it is going to main-main.php So it should be the whole middle column so that it needs a top / footer cover. Data
The HTML phone via AGX is organized in a PHP page which uses this code to see who is asking, and then formatting the HTML response properly.
$ array [] = "/cf/about.php"; $ Array [] = "/cf/about/about-main.php"; $ Array [] = "/cf/about/other-page.php"; $ Ispage = ""; Forex currency ($ value $ value) {if ($ _SERVER ['HTTP_REFERER']! = $ Value) {$ ispage = ""; } And {$ ispage = "woot"; }} If ($ ispage == "woot") {$ echo $ content; } Else {include_once 'about-header.php'; Counterpart $ content; Include_once 'about-footer.php'; }
The problem is ... HTTP_REFERER looks a bit hit and miss. It works fine while working on the network, but I have tried it at home on my computer and it has failed to work clearly - the results are horrible: o
Is there someone else receive mode? I think the session variable can be used, but then I did not get much experience of that!
Any and all hints / suggestions are appreciated;) Thanks!
Edit:
This page is actually an employee profile page. It is about its general condition. PHP and the second column detector displays a grid of thumbnails, when clicked, load the profile through AJAX on that place. All good and simple-back buttons reload the grid of photos.
The problem is that every staff member also needs a stable page. I have made / staff-name.php about them, though the content is the same. I want the server to know that a person / staff-name has come to the FPP and if so, wrap the header / footer around it.
If the request comes from the photo grid i.e. ajax) then it does not require header / footer cover.
Is that obvious? : O
1) If AJAX request - no wrapper 2) If no AJAX request - Add Header / Footer Cover
Edit:
Edit:
Edit:
Edit:
Edit Do:
Edit:
Then about / staff-name.php displays content about it / staff-name.php About AJAX calls through Do you? FromAjax = 1
Then about / in the staff-name.php file:
if (isset ($ _REQUEST ['ajax']) {$ content ; } Else {include_once 'about-header.php'; Counterpart $ content; Include_once 'about-footer.php'; }
Comments
Post a Comment