This topic is locked

Error 256 'character in a text box

8/8/2008 7:47:27 PM
PHPRunner General questions
G
gdude66 author

I have a text box that is used to enter information. Whenever a user uses ' such as Fred's it breaks the sql write and the following error is displayed
PHP error happened
Technical information

Error type 256

Error description 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 's', '2008-08-09 09:43:07', '1', '40')' at line 1

URL tracker.maryborougheducationcentre.vic.edu.au/righttrack/Select_Types_Of_Behaviour_list.php?

Error file C:\web\Apache2.2\htdocs\righttrack\include\dbconnection.php

Error line 26

SQL query delete from `reasons` where id=6

Solution This is a general error. It occurs when there is an error in event code or in SQL.
Send your SQL or event code along with full error message tosupport@xlinesoft.com.
Is there any way to fix this? I have the same project on my own box and a shared host. This error does not occur on the shared host.

T
thesofa 8/8/2008

Gday Graham, good to see you back here again.
searching here for Apostrophe raises 6 posts with the same problem, is there no answer quoted there?

G
gdude66 author 8/8/2008

Solved.

For anyone else with this problem turn on from php.ini

Hi Sofa - it wasn't in the forums found the solution using google

T
thesofa 8/9/2008

Hi Graeme, sorry I spelled your name wrong.

cheers

thesofa