lJesterl Posted August 21, 2008 Share Posted August 21, 2008 This may be a silly question and not possible but im needing to achieve something and i think the best and easiest way would be if i could get the page name, i.e, main.php or testimonial.php and do something like if($pagename = main.php){ $code="0"; } if($pagename = testimonial.php{ $code="1"; } possible? Link to comment https://forums.phpfreaks.com/topic/120720-page-name-question/ Share on other sites More sharing options...
Lamez Posted August 21, 2008 Share Posted August 21, 2008 I do not get what you want to do!? Link to comment https://forums.phpfreaks.com/topic/120720-page-name-question/#findComment-622063 Share on other sites More sharing options...
trq Posted August 21, 2008 Share Posted August 21, 2008 if ($_SERVER['SCRIPT_FILENAME'] == 'main.php') { $code = 0; } elseif ($_SERVER['SCRIPT_FILENAME'] == 'testimonial.php') { $code = 1; } Link to comment https://forums.phpfreaks.com/topic/120720-page-name-question/#findComment-622068 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.