flashback Posted July 8, 2006 Share Posted July 8, 2006 my site's coded into php / anyway, whenever I click a link, nothing happens, except the index.php refreshes with the news.html..http://www.foxyones.net/Click a link and you'll see..does anyone know the problem / know how I can fix it / or anything valuable to the prob?it'll be greatly appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/ Share on other sites More sharing options...
pocobueno1388 Posted July 8, 2006 Share Posted July 8, 2006 Maybe you are not coding the URL right. It looks as if you have had it working before..? If not, maybe you should just link directly to the pages instead of putting "php?id=simpson" in the link. Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-54932 Share on other sites More sharing options...
flashback Posted July 8, 2006 Author Share Posted July 8, 2006 it worked well like two days agoi rather have those pages inside the content area, thoughx() Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-54934 Share on other sites More sharing options...
flashback Posted July 8, 2006 Author Share Posted July 8, 2006 here's the index.php code in the desired content area:<?php if ($id == "") { include "news.html"; } else { include "$id.html"; }?>anything wrong in that? Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-54935 Share on other sites More sharing options...
flashback Posted July 8, 2006 Author Share Posted July 8, 2006 my host's IonCube went down a day ago...i have no idea what it is, but i think it has something to do with php protectioncould that in any way effect my pages? Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-54945 Share on other sites More sharing options...
ShogunWarrior Posted July 8, 2006 Share Posted July 8, 2006 Don't know, but if they have switched off register_globals in the configuration then it might make a difference.Try replacing $id with $_GET['id'] in your if statements and see if that makes a difference. Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-54952 Share on other sites More sharing options...
flashback Posted July 8, 2006 Author Share Posted July 8, 2006 it made a differencenow when i click a link, it actually takes me to a different pagebut its an error pagestill, we're making progress Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-54961 Share on other sites More sharing options...
flashback Posted July 8, 2006 Author Share Posted July 8, 2006 with adding the code you saidit says;Warning: main(.html): failed to open stream: No such file or directory in /home/foxyones/public_html/index.php on line 187Warning: main(): Failed opening '.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/foxyones/public_html/index.php on line 187 Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-54962 Share on other sites More sharing options...
ShogunWarrior Posted July 8, 2006 Share Posted July 8, 2006 Hmm, seems that's returning an empty string, so empty string plus .html = ".html", which doesn't exist.You could try [b]print_r($_REQUEST);[/b] to see what the page is taking in and it will give a better idea of what's going on.Also, you could make a page with [b]<?php phpinfo(); ?>[/b] on it and this will display alot of configurations that could point to the problem. Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-54964 Share on other sites More sharing options...
flashback Posted July 8, 2006 Author Share Posted July 8, 2006 http://www.foxyones.net/ad.phpi dont understand the configslooking at it Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-54966 Share on other sites More sharing options...
ShogunWarrior Posted July 8, 2006 Share Posted July 8, 2006 According to the output I think this should work: <?php if ($_REQUEST['id'] == "") { include "news.html"; } else { include $_REQUEST['id'].".html"; }?> Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-54967 Share on other sites More sharing options...
flashback Posted July 8, 2006 Author Share Posted July 8, 2006 jesus you're a freaking geniusthanks for the help, everyonei would send you all cookies, but i have a meeting to go towhat was the problem, btw? (ill read your response when i return) Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-54969 Share on other sites More sharing options...
ShogunWarrior Posted July 8, 2006 Share Posted July 8, 2006 Well you were checking $id but because the server has upped it's security, if you want to refer to a variable in the address then you must use $_GET or $_REQUEST, with the variable name in square brackets; $_GET['VARNAME']. Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-54970 Share on other sites More sharing options...
shoz Posted July 9, 2006 Share Posted July 9, 2006 You may want to read the following threadhttp://www.phpfreaks.com/forums/index.php/topic,95407.msg382014.html#msg382014 Quote Link to comment https://forums.phpfreaks.com/topic/14053-biggest-php-complication-of-the-decade/#findComment-55007 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.