dachshund Posted July 31, 2009 Share Posted July 31, 2009 with this <?php $id=mysql_real_escape_string($_GET['id']); if ($id != (int)$id) { echo "Invalid ID"; } else { $sql = "UPDATE content SET views=views+1 WHERE id='$id'"; mysql_query($sql) or die (mysql_error()); $sql="SELECT * FROM content WHERE id='$id'"; $result = mysql_query($sql) or die (mysql_error()); $rows=mysql_fetch_array($result); } ?> anyone know why this might be? Quote Link to comment Share on other sites More sharing options...
gevans Posted July 31, 2009 Share Posted July 31, 2009 Where's your connect script? Quote Link to comment Share on other sites More sharing options...
dachshund Posted July 31, 2009 Author Share Posted July 31, 2009 this <?php session_start(); $connect= mysql_connect ("blah", "blah", "blah") or die(mysql_error()); $db = mysql_select_db ("blah", $connect); $session_name = $_SESSION['uid']; ?> Quote Link to comment Share on other sites More sharing options...
TeNDoLLA Posted July 31, 2009 Share Posted July 31, 2009 It smells a bit that your mysql server is not running properly or not at all or it could be permissions issue. Also if you are connecting locally tou can try changing the host you connect from localhost to 127.0.0.1 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.