Jump to content

mysql injection problem


manwhoeatsrats

Recommended Posts

Okay maybe I have gone blind, but I don't see where the error is in my query.

any help would be appreciated.

 

both fields that are to be injected into are varchar(55)

 

 

here is a shortened version of my script

 

<?php
$users_ip		= 	$_SERVER['REMOTE_ADDR'];

mysql_query("INSERT INTO ip_ban SET (ip_address ,ban_reason) VALUES
('$users_ip','1')") or die("psau_error5 " . mysql_error());
?>

 

As you can see, the values are making it to the query, and I am not getting any errors about the field names.....I am just at a loss...

The error:

psau_error5 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( ip_address , ban_reason ) VALUES ('127.0.0.1' , '1' )' at line 1

Link to comment
https://forums.phpfreaks.com/topic/189431-mysql-injection-problem/
Share on other sites

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.