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
https://forums.phpfreaks.com/topic/93694-strange-results-in-my-database/
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?

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.