zbrahead Posted April 21, 2006 Share Posted April 21, 2006 [code]<?php#Set Variables to content for tables depending on $page variable.if($page = home ) {$headid1 = "Welcome to our home-page This is your gateway to the rest of the site"; $msgid1 = "Welcome to Era-Games Homepage, we hope you find many things to do here,our demos our currently locked down because of the people exploiting this generous service"; $headid2 = "An Apology"; $msgid2 = "We apologize for the adverts on this screen and as soon as possible we are working to remove these."; $headbelow1 = ""; $msgbelow1 = ""; $headbelow2 = ""; $msgbelow2 = "";}elseif($page = about ) {$headid1 = "Welcome to the about us page"; $msgid1 = ""; $headid2 = ""; $headbelow1 = ""; $msgbelow1 = ""; $headbelow2 = ""; $msgbelow2 = "";}elseif( $page = forum ) { header( "location:http://eragames2.byethost7.com/forum/"); exit(); }elseif( $page = news ) { header( "location:http://eragames2.byethost7.com/news/"); exit(); }elseif( $page = contact ) {$headid1 = "Welcome to the Contact Us page"; $msgid1 = ""; $msgid2 = "" $headid2 = ""; $headbelow1 = ""; $msgbelow1 = ""; $headbelow2 = ""; $msgbelow2 = "";}?> [/code]$page is ascertained by an extensionj onto the url in ?page=home etc.please help!!!! Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted April 22, 2006 Share Posted April 22, 2006 a few errors in the code.$msgid2 = ""when it shows up for the second time you forgot to close it with the colon ; symbol, that might fix your problem. Quote Link to comment Share on other sites More sharing options...
Barand Posted April 23, 2006 Share Posted April 23, 2006 And if that wasn't it then tell us what the problem is. - what is not doing that it should do? - what is it doing that it shouldn't do?Don't just post code and say it doesn't work if you expect help. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 23, 2006 Share Posted April 23, 2006 The comparison operator is the double equal sign "==", you have a single equal sign in all of your "if" statements. Change it to a double equal.You're also assuming that register_globals is enabled. You should use $_GET['page'] instead.Ken Quote Link to comment 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.