Codes here !
Moderators: macek, egami, gesf
- New php-forum User
- Posts: 8
- Joined: Tue Aug 20, 2002 11:57 am
can be valid data, so long as they are properly escaped.
For example, if you wanted to insert the word you're
you would have to insert you\'re
INSERT INTO table VALUES('you\'re');
To escape your strings in PHP use the addslashes
Code: Select all
$before = "you're";
$after = addslashes($before);
You should be able to insert $after without any errors. Try echoing $before and $after to see the difference.
Hope this helps!
Who is online
Users browsing this forum: No registered users and 2 guests