Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

[Resolved] PHP Question

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

Wesley

Established Member
Impact
1
PHP Question

Ok, I haven't done PHP in a couple years, so I'm a bit rusty.

Now, when you have domain.com/index.php?page=whatever, to see what the page is in your code (to check to see what page needs to be displayed), don't you just use
PHP:
if($page=="whatever")
{
print 'this shows up';
}

But it doesn't seem to work... I found one of my old scripts I wrote a while back and it wont work properly.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Try replacing $page with $_GET['page']
 
0
Close
Yay, that worked :) Thanks!
 
0
Close
Just thought I would give an quick explanation on why it does not work.

$page would work if register_globals was enabled. Your current server must have it disabled (it has been disabled by default for some time but a lot of hosts change that to enabled)
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back