Fenlig Posted August 12, 2012 Share Posted August 12, 2012 Hey guys, So here is my scripts: test.php <?phpinclude 'connect.php';?> connect.php define("HOST", "localhost");define("USER", "guest");define("PASSWORD", "guest");define("DATABASE", "Minecraft");$mysqli = new mysqli (HOST, USER, PASSWORD, DATABASE); But when I go and view the test.php in my browser it just prints all the code on the screen like this define("HOST", "localhost"); define("USER", "guest"); define("PASSWORD", "guest"); define("DATABASE", "Minecraft"); $mysqli = new mysqli (HOST, USER, PASSWORD, DATABASE); Im a newb to PHP can anyone see what I have done wrong? Link to comment Share on other sites More sharing options...
Fenlig Posted August 12, 2012 Author Share Posted August 12, 2012 I believe I found the Solution was was to add <?php to the connect.php. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now