Jump to content

current page question


Dville

Recommended Posts

so i have a link on page1.php. that takes a variable to page2.php when clicked.

Im looking to do an if/else statement to do

if - current page = page1.php
show this code

so that when you view the table from page2.php it doesnt show the link to the page im already at

thanks in advanced for anyone who can help
Link to comment
Share on other sites

I dont get it?

1 - why only single quotes
2 - what makes $page so special? how is that linked to whatever page I am currently at?

How I see it, I am just stuffing the string 'page1.php' into the variable. The code you show doesn't check the current page at all.

Any other ideas?

Link to comment
Share on other sites

This doesn't appear to work either.

on your code, lines 3, 4, and the 'arr[$num - 1] i am not sure what it does.

After thinking it through, since multiple pages use my code via the include function, I need it to be if 'the page im at now' != page2.php

but even after changing your code, that doesn't seem to work. since you're using the php_self command, and my current url being page2.php?appid=65. is that making it not work, instead of it being just page2.php
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.