Jump to content

Get current page from an included PHP script


skania

Recommended Posts

So I have a tedious status selection bar that is on every page, so I simply used an include on the pages, the actual navigation bar separated.

 

The navigation is ~/public_html/courseListMenu.php

 

 

When the user is on a certain page, it will simply refresh the page to the current page, which the updated status (courseID), and the information about that course.

However, if the user is looking at a participant, and clicks on the navigation (ie, change the courseID, thus changing the catalog of people in it), I want to redirect to the index.php.

 

 

 

So here is the problem:

 

I have a URL, www.example.com/atn/index.php

 

*A class is selected*

 

New URL with updated page, www.example.com/atn/index.php?CRN=999999999

 

Select editparticipant, www.example.com/atn/editparty.php?CRN=999999999&PARTY=111111111

 

*A new class is selected*

 

I need to extract "editparty.php" so I can compare the string and if they match, then revert the user back to index.php.

I need to compare strings, because since this is an include, there will be other pages that will redirect the user to index.php

 

The exact problem I have is that I can get the script that is running, but it is the INCLUDED script filename, not the file name it is INCLUDED on, which is the filename I need.

 

 

I hope this is clear; if it isn't, I can try to explain a little better.

 

If anyone has any idea on how I can get this, it would be very much appreciated!

Edited by skania
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.