issue with remarks request method

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
praveenk252
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Jun 25, 2017 5:40 am

Sun Jun 25, 2017 5:44 am

Rmarksa is a html text area

<textarea rows="4" cols="30" maxlength="200" name="remarksa" id="remarksa" >



$remarks1 = mysqli_real_escape_string($mysqli, $_REQUEST['remarksa']);

when u execute this it is throwing a error ,

ERROR: Could not able to execute INSERT INTO `itemmtr` (`itemname`, `itemcode`, `uom`, `Make`, `baseprice`, `cat1`, `Cat2`, `MOQ`, `Openingstock`, `adddate`, `Lastupdateddate`, `Useradding`, `lasteditinguser`, `Remarks`, `Margindiff`, `taxcategory`) VALUES (5, 5, 5, 'a', '2.0', 5, 5, '0', '0','2017-06-30 00:00:00', '2017-06-30 00:00:00', 'Praveen', 'Praveen', 5\r\n, 5, 5). 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 '\r\n, 5, 5)' at line 1

plz help
praveenk252
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Jun 25, 2017 5:40 am

Sun Jun 25, 2017 6:54 am

This is resolved

Just add ' ' to query string
AdoptiveSolution
php-forum Super User
php-forum Super User
Posts: 167
Joined: Wed Jun 15, 2016 8:35 am

Mon Jun 26, 2017 12:01 am

I don't think this is correct as a value :

5\r\n
Post Reply