Error Plz help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Neeti
Forum Newbie
Posts: 1
Joined: Mon Sep 21, 2009 3:10 am

Error Plz help

Post by Neeti »

Hello Please anybody help i am facing this problem ,when somebody added "/\/\" this string in place of name or anything else it shows this error how could it can be removed .

insert into tbl_staff_member set staff_addedon='2009-09-22 01:35:27', staff_addedby='', staff_name='/\/\', staff_phone='1234567896', staff_email='neeti@gm.com', staff_address='aa'
as following error is encountered...

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 '1234567896', staff_email='neeti@gm.com', staff_address='aa'' at line 1
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: Error Plz help

Post by papa »

Validate your user input and also use mysql_real_escape_string().
Post Reply