beansandsausages Posted December 1, 2007 Share Posted December 1, 2007 could any body take a look at this please. The query insert wont insert the data to the data base the code is $update_time = mysql_query("UPDATE `users` SET times_on=times_on+'1' WHERE username='$_SESSION[username]'"); $update_ip = mysql_query("UPDATE `users` SET ip='$_SERVER[REMOTE_ADDR]' WHERE username='$_SESSION[username]'"); $update_location = mysql_query("UPDATE `users` SET page='$location' WHERE username='$_SESSION[username]'"); $check = mysql_query("SELECT * FROM users WHERE username = '$_SESSION[username]'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) if($_SESSION['valid']) { // reset counter random link if($_GET[reset_link] == "online_count") { echo " <strong><font color=\"red\">Online count reset</font></strong> <a href=mem.php> back </a> <br /><br /> "; $update_time = mysql_query("UPDATE `users` SET times_on='-1' WHERE username='$info[username]'"); $log = mysql_query("INSERT INTO logged (id, security, changed_by, there_id, action) VALUES ('','$info[security]','$info[username]', '$info[id]', 'Reset Counter', "); Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted December 1, 2007 Share Posted December 1, 2007 Run this, post results: <?php // bunch of your code, then $sql = "INSERT INTO `logged` (`id`, `security`, `changed_by`, `there_id`, `action`) VALUES ('','" . $info['security'] . "', '" . $info['username'] . "', '" . $info['id'] . "', 'Reset Counter') "; if ( !$result = mysql_query($sql) ) { die('MySQL Error: ' . mysql_error()); } PhREEEk Quote Link to comment Share on other sites More sharing options...
beansandsausages Posted December 1, 2007 Author Share Posted December 1, 2007 thank you works fine Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted December 1, 2007 Share Posted December 1, 2007 thank you works fine /nods Quite welcome = ^) PhREEEk 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.