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', "); Link to comment https://forums.phpfreaks.com/topic/79685-solved-stuck-well-and-truley/ 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 Link to comment https://forums.phpfreaks.com/topic/79685-solved-stuck-well-and-truley/#findComment-403534 Share on other sites More sharing options...
beansandsausages Posted December 1, 2007 Author Share Posted December 1, 2007 thank you works fine Link to comment https://forums.phpfreaks.com/topic/79685-solved-stuck-well-and-truley/#findComment-403541 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 Link to comment https://forums.phpfreaks.com/topic/79685-solved-stuck-well-and-truley/#findComment-403544 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.