Jump to content

[SOLVED] stuck. Well and truley


burnside

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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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