Apostrophe prevents tickets from be entered into database

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
sttmxn

Apostrophe prevents tickets from be entered into database

Post 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!
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hello,

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

Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
sttmxn

Post by sttmxn »

Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
sttmxn

Post by sttmxn »

That fixed it...thanks!
Post Reply