Im having a serious PHP problem... its not that hard, i dont think... so if you could help, i would be very appreciative..
I want it so that the sites address shows mypage.php?tutorial=sometutorial
The code im using is:
<?
if (!file_exists($tutorial.".html")) {
die("Nice Try");
} else {
include $tutorial.".html";
}
?>
It works, except for the fact that the die part of the code acts on the page i put it on... i dont want it to do that. I want it to act on the tutorial page, so that if someone tries to call it from my website, it wont work
Also, when i click the link to include the tutorial (im doing this without the die function now), it works, except it includes the file at the top of the page the link is on, leaving the page with the link on it, at the bottom of the screen, while the tutorial is still at the top!
I hope you can tell me a better way to do this! THNX!
:: Lokannon
I want it so that the sites address shows mypage.php?tutorial=sometutorial
The code im using is:
<?
if (!file_exists($tutorial.".html")) {
die("Nice Try");
} else {
include $tutorial.".html";
}
?>
It works, except for the fact that the die part of the code acts on the page i put it on... i dont want it to do that. I want it to act on the tutorial page, so that if someone tries to call it from my website, it wont work
Also, when i click the link to include the tutorial (im doing this without the die function now), it works, except it includes the file at the top of the page the link is on, leaving the page with the link on it, at the bottom of the screen, while the tutorial is still at the top!
I hope you can tell me a better way to do this! THNX!
:: Lokannon