Jump to content

website works on local machine, error when hosted

Recommended Posts

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 post
Share on other sites

Check for the errors usng mysql_error() when $result return false to ensure why query is failing. your $result is returing false.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...