[PHP] ' giving problem while inserting in table.

2002-07-12 Thread Anil Garg
Hi, I am making a faq maintenance system using mysql and php. To insert a entry in to a faq table i am using the following query: - INSERT INTO faq_table_netvd (id,question, answer,netvcr,netdetector,add_date,mod_date,keyword,category,display,attach_ id) VALUES ('0','$frm[question]',

Re: [PHP] ' giving problem while inserting in table.

2002-07-12 Thread Martin Clifford
Use addslashes() on ALL strings before inserting them into your database. Then, on your frontend, extract the data and use stripslashes() on all strings. Hope to help! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Anil

Re: [PHP] ' giving problem while inserting in table.

2002-07-12 Thread 1LT John W. Holmes
problem while inserting in table. Use addslashes() on ALL strings before inserting them into your database. Then, on your frontend, extract the data and use stripslashes() on all strings. Hope to help! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http

Re: [PHP] ' giving problem while inserting in table.

2002-07-12 Thread Anil Garg
]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 12, 2002 12:12 PM Subject: Re: [PHP] ' giving problem while inserting in table. You DON'T have to use stripslashes() on data coming out of a database. The slashes were there to escape certain characters so they could make

Re: [PHP] ' giving problem while inserting in table.

2002-07-12 Thread Anil Garg
thanx, its working perfect now anil :) - Original Message - From: 1LT John W. Holmes [EMAIL PROTECTED] To: Anil Garg [EMAIL PROTECTED]; Martin Clifford [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 12, 2002 12:46 PM Subject: Re: [PHP] ' giving problem while inserting in table

Re: [PHP] ' giving problem while inserting in table.

2002-07-12 Thread Scott Hurring
or, more appropriately, use the database-specific escape function... for mysql: http://www.php.net/manual/en/function.mysql-escape-string.php http://www.php.net/manual/en/function.mysql-real-escape-string.php -- Scott Hurring Systems Programmer EAC Corporation scott (*) eac.com -- Martin