raptor30506090 Posted April 8, 2012 Share Posted April 8, 2012 Hello i have a fade in image on my home page id=1 but when i go to about page id=2 i want it to go i have tryed to us if($id == 1){ show rollover }else{ do somthing } that works but when i open the website up it gives me an error because i have not selected a page for the id is there away round this any help would be great thanks Quote Link to comment https://forums.phpfreaks.com/topic/260560-php-hide-and-show-fadding-images/ Share on other sites More sharing options...
Andy-H Posted April 8, 2012 Share Posted April 8, 2012 $id = isset($_GET['id']) ? (int)$_GET['id'] : 1; if ( $id == 1 ) { // do something } else { // do something else } Quote Link to comment https://forums.phpfreaks.com/topic/260560-php-hide-and-show-fadding-images/#findComment-1335366 Share on other sites More sharing options...
raptor30506090 Posted April 8, 2012 Author Share Posted April 8, 2012 Thank you so much :D :D :D Quote Link to comment https://forums.phpfreaks.com/topic/260560-php-hide-and-show-fadding-images/#findComment-1335367 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.