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]',
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
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
]; [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
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
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
6 matches
Mail list logo