MyBB Community Forums

Full Version: Quick question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!
I am trying to integrate MyBB with my website but there's something easy I don't really understand.

I created the following php-script. If you visit this page it says "This is the defaultpage". If you add "?booo=hello" in the adresbar, it says
You typed website.com/thispage.php?booo=hello

So this is the script:
<?php
if(isset($booo)){
echo "You typed website.com/thispage.php?booo=".$booo;

} else {
echo "This is the defaultpage";
}

?>

Now, if I add two lines at the beginning of the file, like this:

<?php
define("IN_MYBB", 1);
include("global.php");

if(isset($booo)){
echo "You typed website.com/thispage.php?booo=".$booo;

} else {
echo "This is the defaultpage";
}

?>

then my code stops working. Then it always says "This is the defaultpage", even if you add "?booo=hello" at the end of the url.
What's the reason behind this? How can I fix this (without removing the first two lines of the file)?

Thanks for reading this

Nevermind, got the answer.
I put $_GET["booo"]; after the second line.