bftwofreak Posted July 23, 2008 Share Posted July 23, 2008 I'm trying to create a Halo 3 stats module on my site but to get the basics I use a readfile(); command, but people have to enter their gamertags in first. <?php if (!defined('MODULE_FILE')) { die('You can\'t access this file directly...'); } define('INDEX_FILE', true); $module_name = basename(dirname(__FILE__)); if (isset($_REQUEST['player'])) { $url = 'http://www.bungie.net/stats/Halo3/default.aspx?player=' . $_REQUEST['player']; $file = '<div style="visibility: hidden">'; $file .= readfile($url); $file .= '</div>'; } else { $file = file_get_contents('tag.html'); } include('header.php'); OpenTable(); echo $file; CloseTable(); include('footer.php'); ?> You guys can say what you want about the CMS I use, but I need help with the if/else statement. Link to comment https://forums.phpfreaks.com/topic/116131-solved-php-if-statement-issue/ Share on other sites More sharing options...
vbnullchar Posted July 23, 2008 Share Posted July 23, 2008 whats is wrong with the if/else statement? Link to comment https://forums.phpfreaks.com/topic/116131-solved-php-if-statement-issue/#findComment-597185 Share on other sites More sharing options...
bftwofreak Posted July 23, 2008 Author Share Posted July 23, 2008 oh sorry... haha. when $_REQUEST['player'] isn't set, tag.html won't load at all... Link to comment https://forums.phpfreaks.com/topic/116131-solved-php-if-statement-issue/#findComment-597186 Share on other sites More sharing options...
bftwofreak Posted July 23, 2008 Author Share Posted July 23, 2008 oh sorry guys. Brain fart. didn't put the module's directory before the tag.html. My bad. Link to comment https://forums.phpfreaks.com/topic/116131-solved-php-if-statement-issue/#findComment-597193 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.