Re: Problem - Insert data into mysql
| From: | Daniel Rezny | Date: | Wed, 06 Dec 2000 11:03:17 +0000 |
| Subject: | Re: Problem - Insert data into mysql | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-5040@lists.php.net to get a copy of this message | ||
Hello Ian,
Wednesday, December 06, 2000, 9:22:58 AM, you wrote:
I> Hi ; )
I> I'm facing a problem when I input/enter a sentence with special character
I> like '.
I> Examples : -
I> $test1 = "We're going to town
I> est2 = "We are going to town
I> My HTML form tag.
I> <textarea name="test' rows="5" cols="40"></textarea>
I> My PHP $sql statement like below:-
I> $sql = "INSERT INTO
I> demo(id,name,info)
I> values('$id','$name','$test1')";
I> I can't insert data $test1 into mysql database, but data $test2 is NO
I> PROBLEM.
I> Could anybody help me !!!!!
I> Any help would be apreciate.
I> Kind regards,
I> Hee.
Try to use a addslashes() function. I think the "'" makes a problem.
Hope it helps
--
Best regards,
Daniel mailto:dr@photo.digitallaut.at