about the symbol '

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tisa
Forum Commoner
Posts: 27
Joined: Fri Nov 28, 2003 1:14 am

about the symbol '

Post by tisa »

i have one form, when user key in the symbol ', my program will change this symbol to '', i don't know?

someone can give me suggestion??
thanks
User avatar
DuFF
Forum Contributor
Posts: 495
Joined: Tue Jun 24, 2003 7:49 pm
Location: USA

Post by DuFF »

Run stripslashes() on it.

Code: Select all

<?php
$input ="I don''t know";
$input = stripslashes($input);
echo $input; // OUTPUT: I don't know
?>
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

tisa
Forum Commoner
Posts: 27
Joined: Fri Nov 28, 2003 1:14 am

thank you

Post by tisa »

it's work!

thanks a lot
tisa
Forum Commoner
Posts: 27
Joined: Fri Nov 28, 2003 1:14 am

another problem

Post by tisa »

but i cannot save the data to database?
why
Post Reply