Jump to content

strange results in my database


brown2005

Recommended Posts

		$hits_sql = mysql_query("SELECT * FROM statistics_hits_website WHERE hits_user='$config_ip' AND hits_user_type='0' AND hits_date='$date' AND hits_page='$page'", $connection);
	$hits_rows = mysql_num_rows($hits_sql); 

	if ($hits_rows > 0)
	{
  
		$hits_update = "UPDATE statistics_hits_website SET hits_count= hits_count +1 WHERE hits_user='$config_ip' AND hits_user_type='0' AND hits_date='$date' AND hits_page='$page'";
		mysql_query($hits_update);	    
    	    
	}
	else
	{
  
		$hits_insert = "INSERT INTO statistics_hits_website(hits_user,hits_user_type,hits_page,hits_date,hits_count) VALUES('$config_ip','0','$page','$date','1')";
		mysql_query($hits_insert);

	}

 

i have the following code which keeps record of hits to my website but i am getting some strange results in my table... for hits_page

 

http://www.cjp.spb.ru/en/tis/leboma/

http://www.psikolojikyardim.org/etkinlik/include/eto/nixaz/

http://www.northfans.ch/forum/admin/settings/gucor/ujusu/

 

how on earth have these got in here? and how can i stop them?

 

 

Link to comment
Share on other sites

hi i have worked out wat the problem is with the above. i have say this below to get pages..

 

index.php?page=home

 

but if you change to say

 

page=rjewngjrgjrwengjerjgnrejkg

 

then

 

rjewngjrgjrwengjerjgnrejkg

 

is entered into my website. how can i make it so only a certain set of pages is entered... would it be best to create a function or a table with what is acceptable or something else?

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.