Ticket not entered into database if apostrophe present.

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
forgette
Posts: 5
Joined: Thu May 26, 2005 7:15 pm

Ticket not entered into database if apostrophe present.

Post by forgette »

Script URL: [private]
Version of script: 0.91
Version of PHP: 4.3.11
Hosting company: [myself]
Have you searched THIS FORUM for your problem: yes
(if not please do before posting)
If so, what terms did you try: conjunctions, contraction, apostrophe, '

It appears that if an individual submitting a ticket includes an ' in the message field, it will result in the ticket not being entered into the database.

Sample [edited for privacy]

Couldn't execute SQL: INSERT INTO `hesk_tickets` ( `id`,`trackid`,`name`,`email`,`category`,`priority`,`subject`,`message
`,`dt`,`ip`,`status` ) VALUES ( '','NDEWZE1Q4P','Sean','foo@bar.com','12','3','Test ticket and Intranet','Bill, if you get a chance tell me what you think of the links on the Intranet. If you have any other wording or location in mind I'm all ears.',NOW(),'IPADDRESSHERE','1' )
Please contact webmaster at bill@foo.bar and give him this error message


Notice the: I'm

Take out I'm and it works fine.
--
Bill
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hi,

Thanks for letting me know, will fix this. As a temporary solution you can try editing your php.ini file and set magic_quotes_gpc to On:

magic_quotes_gpc=On

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

Post by Klemen »

Does this file solve your problem? Just replace the original common.inc (in the "inc" folder) with this one:

http://www.phpjunkyard.com/extras/hesk_common.zip

Does it fix it?

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
forgette
Posts: 5
Joined: Thu May 26, 2005 7:15 pm

apostrophe isse fixed

Post by forgette »

the new common.inc fixes the apostrophe issue.

Thanks!
--
Bill
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Ok, I've included that fix in the new 0.92 version along with some other fixes.

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
Post Reply