darish Posted April 27, 2015 Share Posted April 27, 2015 Well, my website is not reading the "config.php" page , so its not going to "data base" :/ can someone help me out , why is not ? its probably a easy thing to correct to someone who knows :3sry about my english, and I hope I posted this in the right place. config page only have this <?php @session_start(); $connectdb=mysql_connect("localhost","7milimetros","Chetan123"); $usedb=mysql_select_db("7milimetros",$connectdb); $_SESSION['token']=session_id(); ?> Is something wrong here? the data base is called "7milimetros" ... Quote Link to comment Share on other sites More sharing options...
Solution Ch0cu3r Posted April 27, 2015 Solution Share Posted April 27, 2015 Code for config.php looks ok to me. However you should add error checking to your code to know why the database connection is failing. <?php @session_start(); $connectdb=mysql_connect("localhost","7milimetros","Chetan123") or trigger_error('Unable to connect to mysql: ' . mysql_error(), E_USER_WARNING); $usedb=mysql_select_db("7milimetros",$connectdb) or trigger_error('Unable to select databae: ' . mysql_error(), E_USER_WARNING); $_SESSION['token']=session_id(); ?> This will either force an error message to be shown or it will be logged in your servers error logs. Quote Link to comment Share on other sites More sharing options...
darish Posted April 27, 2015 Author Share Posted April 27, 2015 whats does "chetan123" ? :S Quote Link to comment Share on other sites More sharing options...
darish Posted April 27, 2015 Author Share Posted April 27, 2015 (edited) error in the normal page : http://prntscr.com/6yp0ja error in the code: http://prntscr.com/6yp0ou Thats why I said it was on database, but if its not , is there something wrong? :S Edited April 27, 2015 by darish Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted April 27, 2015 Share Posted April 27, 2015 Those links do not work. Attach screenshots to your post. whats does "chetan123" ? :S That is your database password. Quote Link to comment Share on other sites More sharing options...
darish Posted April 28, 2015 Author Share Posted April 28, 2015 Already fix it ^^ , thank you, dont know how to close thread :S Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted April 28, 2015 Share Posted April 28, 2015 You can close a thread but you can mark it as solved by clicking the Best Answer button. Quote Link to comment 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.