Fridge Posted September 19, 2015 Share Posted September 19, 2015 Hello, I dont know how to ask the question but i'll try. <?php $host = "localhost"; //de host meestal gewoon localhost $user = "beheerder_mb"; //je database username $pass = "floris"; //Je database wachtwoord $tablename = "beheerder_mb"; //Je database naam $sitelink = "http://www.mafiabase.net"; //Je website link. GEEN v3 erachter! $itemsperpage = 30; $connection = new mysqli($host, $user, $pass, $tablename); ?> How am i supposed to fill this in? Quote Link to comment https://forums.phpfreaks.com/topic/298231-connectionphp-file/ Share on other sites More sharing options...
Ch0cu3r Posted September 19, 2015 Share Posted September 19, 2015 How am i supposed to fill this in? Fill in what? Your database credentials? If so you set the values for these variables $host set this to be your mysql servers hostname, leave as localhost if your host has not specified otherwise $user set this to be your mysql username $pass set this to the password for your mysql username $tablename set this to the name of your database. Set $sitelink to the url to your website. Quote Link to comment https://forums.phpfreaks.com/topic/298231-connectionphp-file/#findComment-1521183 Share on other sites More sharing options...
Fridge Posted September 19, 2015 Author Share Posted September 19, 2015 When i do that, nothing changes tho Quote Link to comment https://forums.phpfreaks.com/topic/298231-connectionphp-file/#findComment-1521184 Share on other sites More sharing options...
hansford Posted September 19, 2015 Share Posted September 19, 2015 When i do that, nothing changes tho You have created a connection to the database. Now, you have to run a query for anything to happen. What is it you are trying to accomplish ? Quote Link to comment https://forums.phpfreaks.com/topic/298231-connectionphp-file/#findComment-1521186 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.