June 22, 201016 yr Getting these errors on my home page, still very new to coding and php and I don't really have the foggiest idea of how to handle the situation, any kind of help would be greatly appreciated. Warning: mysql_query() [function.mysql-query]: Access denied for user 'richard'@'localhost' (using password: NO) in /home/richard/public_html/include/config.php on line 8 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/richard/public_html/include/config.php on line 8 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/richard/public_html/include/config.php on line 9 Warning: mysql_query() [function.mysql-query]: Access denied for user 'richard'@'localhost' (using password: NO) in /home/richard/public_html/include/config.php on line 8 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/richard/public_html/include/config.php on line 8 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/richard/public_html/include/config.php on line 9
June 22, 201016 yr Getting these errors on my home page, still very new to coding and php and I don't really have the foggiest idea of how to handle the situation, any kind of help would be greatly appreciated. Warning: mysql_query() [function.mysql-query]: Access denied for user 'richard'@'localhost' (using password: NO) in /home/richard/public_html/include/config.php on line 8 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/richard/public_html/include/config.php on line 8 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/richard/public_html/include/config.php on line 9 Warning: mysql_query() [function.mysql-query]: Access denied for user 'richard'@'localhost' (using password: NO) in /home/richard/public_html/include/config.php on line 8 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/richard/public_html/include/config.php on line 8 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/richard/public_html/include/config.php on line 9 forget the other errors there the result of the first error and the first one means ur database connect info is incorrect paste ur code
June 22, 201016 yr Quite clearly states the user "richard" doesn't have a password supplied with it. You need to correct the username/password
June 22, 201016 yr Author Quite clearly states the user "richard" doesn't have a password supplied with it. You need to correct the username/password Wow thanks for the fast replies. Still really new to all this. How would one go about correcting the username and password? where would those be and how can I change them?
June 22, 201016 yr Author forget the other errors there the result of the first error and the first one means ur database connect info is incorrect paste ur code I have no idea how to resolve this issue, how does one correct the database connection info, and what code exactly should I be pasting as per your request. My company fired our programmer, and threw me into this mess. I usually just edit the films and work with creating Dvd's, but considering my boss thinks that "good with computers" means its now my job to handle any and all problems that involve the website or computer. So if my questions to your comments seem ignorant, its because I really am very new.
June 22, 201016 yr Open the config.php file with a text editor and there should be connection details at the top. If you're still struggling post the PHP code here.
June 22, 201016 yr Author Open the config.php file with a text editor and there should be connection details at the top. If you're still struggling post the PHP code here. this is the config.php code <?php include("init.php"); //include("base.php"); @mysql_connect($server,$user,$pwd); @mysql_select_db($db); @session_start(); $uid = $_SESSION['uname']; $q_meal_info = mysql_query("select primary_goal,height_feet,height_inc,weight,menu_type,activity_level from customer where email='".$uid."'"); $r_meal_info = mysql_fetch_array($q_meal_info); $_SESSION['goal'] = $goal1 = $r_meal_info['primary_goal']; $_SESSION['weight'] = $weight1 = $r_meal_info['weight']; $_SESSION['feet'] = $feet1 = $r_meal_info['height_feet']; $_SESSION['inch'] = $inch1 = $r_meal_info['height_inc']; $_SESSION['aclev'] = $aclev1 = $r_meal_info['activity_level']; ?>
June 22, 201016 yr check init.php and base.php One of those will contain them with $username, $password and $db
June 23, 201016 yr this is the config.php code <?php include("init.php"); //include("base.php"); @mysql_connect($server,$user,$pwd); @mysql_select_db($db); @session_start(); $uid = $_SESSION['uname']; $q_meal_info = mysql_query("select primary_goal,height_feet,height_inc,weight,menu_type,activity_level from customer where email='".$uid."'"); $r_meal_info = mysql_fetch_array($q_meal_info); $_SESSION['goal'] = $goal1 = $r_meal_info['primary_goal']; $_SESSION['weight'] = $weight1 = $r_meal_info['weight']; $_SESSION['feet'] = $feet1 = $r_meal_info['height_feet']; $_SESSION['inch'] = $inch1 = $r_meal_info['height_inc']; $_SESSION['aclev'] = $aclev1 = $r_meal_info['activity_level']; ?> Im assuming it would be in init.php since base.php is commented out
June 23, 201016 yr True, although it could be the password is in the base.php file, and that's why it's not being set
June 23, 201016 yr Yes thats true to so i'd honestly recommend removing // before include("base.php"); and see if that works before looking into the other file
Create an account or sign in to comment