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