dubesinhower Posted July 20, 2011 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? Link to comment Share on other sites More sharing options...
birbal Posted July 20, 2011 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. Link to comment Share on other sites More sharing options...
dubesinhower Posted July 20, 2011 Author 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! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.