sneamia Posted November 13, 2007 Share Posted November 13, 2007 <?php error_reporting(E_ALL); switch ($_GET['purpose']) { case 'news': $result = mysql_query('SELECT `fulltext` FROM `news` WHERE `newsID` = ' . htmlentities($_GET['argument'] . ' AND `deleted` = 0', ENT_QUOTES)); $fulltext = mysql_fetch_array($result); /* Line 8. */ echo 'document.getElementById("text_' . htmlentities($_GET['argument']) . '").innerHTML = "' . str_replace(array("\n", "\r", "\r\n"), '', $fulltext[0]['fulltext']) . '";'; break; default: } ?> That's ajax.php. When I call .../assets/ajax/?purpose=news&argument=2, it gives me a: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in .../assets/ajax/index.php5 on line 8 Quote Link to comment Share on other sites More sharing options...
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.