Jump to content

Script working on local database, but not 000webhost´s?


Fenhopi

Recommended Posts

Here's my code:

<?php
        if($session->logged_in){
		echo "<img src=\"images/oodlestreamsign.jpg\">";
		$username = $_SESSION['username']; 
		$friend_statuses = "SELECT oodles.*, friends2.user1 FROM oodles, friends2 WHERE byuser=friends2.user1 AND user2='$username' ORDER BY oodles.dtime DESC LIMIT 0, 10";

		$result = $database->query($friend_statuses);

		// Loop
		While($myrow = mysql_fetch_array($result))
		{
			//VARS
			$user = $myrow['user1'];


			//Echoes
			echo "By <a href=\"userinfo.php?user=$user\">$user</a>";
			echo "<h3>";
			echo $myrow['oodle'];
			echo "</tr></td>";
			echo "<br><tr><td>On: <i>";
			echo $myrow['dtime'];
			echo "</b></td></tr><tr><td><br>";
			echo "</i></td></tr><hr><br>";
		}
	}

        			
	else{
		echo "<img src=\"images/welcomebanner.jpg\" alt=\"Welcome to Opheim online\">";
	}

	?>

 

This works on my local database, once I upload it says that "mysql_fetch_array(): supplied argument is not a valid MySQL result resource in"..

I don't get why it gives me that error..

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.