dubesinhower 0 Posted July 20, 2011 Report Share Posted July 20, 2011 i tested my script for my website on my local machine (setup with xampp), and it works fine.so i uploaded it to my website today, and it gives two errors. long story short, i made a test page that removed all the html from the php script. <?php ob_start(); ?><?php $db_host = 'localhost'; $db_user = ''; $db_password = ''; $db_database = ''; mysql_connect($db_host, $db_user, $db_password); mysql_select_db($db_database); $result = mysql_query('SELECT * FROM linkstab ORDER BY ID Desc'); ?> <?php print_r(mysql_fetch_array($result)); /*while ($row = mysql_fetch_array($result)) echo $row['Website'], $row['Name']; echo $row['Description']; mysql_free_result($result); mysql_close();*/ ?><?php ob_end_flush(); ?> the website and error are located here hometest.phpfor some reason, it doesn't like the array that i set up to display the $result query information.does anyone have any suggestions? Quote Link to post Share on other sites
birbal 168 Posted July 20, 2011 Report Share Posted July 20, 2011 Check for the errors usng mysql_error() when $result return false to ensure why query is failing. your $result is returing false. Quote Link to post Share on other sites
dubesinhower 0 Posted July 20, 2011 Author Report Share Posted July 20, 2011 Check for the errors usng mysql_error() when $result return false to ensure why query is failing. your $result is returing false.brilliant. the generic user that i created didn't have enough permissions. thanks for the help! Quote Link to post Share on other sites
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.