Jump to content

[SOLVED] stuck. Well and truley


beansandsausages

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

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