Page 1 of 1

Apostrophe prevents tickets from be entered into database

Posted: Thu Aug 25, 2005 9:06 am
by sttmxn
Script URL:
Version of script: .93
Version of PHP: 4.3.11
Hosting company: electricembers.net
Have you searched THIS FORUM for your problem: yes
(if not please do before posting)
If so, what terms did you try: apostrophe

Write your message below:

Any text containing an apostrophe results in an error when I submit the data. For instance, I get the following when I submit a ticket with an apostrophe in the message portion:

Can't execute SQL: INSERT INTO `hesk_tickets` ( `id`,`trackid`,`name`,`email`,`category`,`priority`,`subject`,`message`,`dt`,`ip`,`status` ) VALUES ( '','J3D4QYPUL1','Testy Testerson','email@email.com','1','3','apostrophe test','I'm testing an apostrophe.',NOW(),'000.000.000.000','1' )

MySQL said:
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 'm testing an apostrophe.',NOW(),'000.000.000.000','1' )' at line 5

I have tried updating the "common.inc" file according to the instructions in a previous post. This has not fixed the problem.

Any suggestions? I'd really love to figure this out. Your product is absolutely great, otherwise.

Thanks in advance!

Posted: Thu Aug 25, 2005 10:32 am
by Klemen
Hello,

Please upload this file and link to it:
http://www.phpjunkyard.com/extras/phpinfo.zip

Regards

Posted: Thu Aug 25, 2005 8:09 pm
by sttmxn

Posted: Thu Aug 25, 2005 10:39 pm
by Klemen
Hmm, I am not sure why ini_get('magic_quotes_gpc') wouldn't work on your server (although I never tested the script on FreeBSD) but this should fix it:
http://www.phpjunkyard.com/extras/common_gpc.zip

Just upload it to the inc folder.

Let me know if it works.

Regards

Posted: Thu Aug 25, 2005 10:49 pm
by sttmxn
That fixed it...thanks!