PDA

View Full Version : [PHP] Displaying text problem



Polykranopalous
January 22nd, 2005, 00:28
Alright i have a database setup named NEWS. Tables in it are newstitle and news, newstitle is setup as varchar(255) and news is setup as text.
In my form, the newstitle is a TEXT box and the news is a TEXTAREA. Now when I type in let's say for newstitle "hey's" and for news "hey guy's" and submit it, when I go to view it on the index page it shows up like:

hey's
hey guy\'s

I was wondering how do I get the backslashes (\) to stop showing up when I type a word with an apostraphe, i know this may sound a bit confusing but i cant think of any easy way to explain it right now as its earlier in the morning and im tired lol...if anyone understands what i said here, please help
thanks!

kabatak
January 22nd, 2005, 00:37
Alright i have a database setup named NEWS. Tables in it are newstitle and news, newstitle is setup as varchar(255) and news is setup as text.
First, I think you meant "NEWS" as the table and "newstitle" and "news" are the fields.

For your question, read on: addslashes(); stripslashes(); get_magic_quotes_gpc();

Polykranopalous
January 22nd, 2005, 00:39
lol silly me, sorry yes i did mean that... Alright thanks so much!