Displaying text problem

Any problem with PHP can be disscused here
Post Reply
xuehen
Posts: 3
Joined: Sun Jan 23, 2005 6:18 am

Displaying text problem

Post by xuehen »

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!


tanaka
Posts: 195
Joined: Sat Mar 05, 2005 5:27 pm

Post by tanaka »

Post the code so we can see what is going on with it. :wink:
L O L
jnjwebdev
Posts: 26
Joined: Mon Jul 25, 2005 4:38 pm
Contact:

Post by jnjwebdev »

$text = stripslashes($text);
Lixas
Posts: 750
Joined: Wed Feb 16, 2005 4:21 pm

Post by Lixas »

[quote="jnjwebdev"]$text = stripslashes($text)]
TIP:

Code: Select all

u can use $text= nl2br($text) to change 
 to \n to save in db
all manual about it is in http://lt.php.net/manual/en/function.nl2br.php
Image
bangbanger
Posts: 262
Joined: Wed Jul 20, 2005 10:57 pm

Post by bangbanger »

im going to be putting a news script on my forum i think. anyone know where i can get the script?
jnjwebdev
Posts: 26
Joined: Mon Jul 25, 2005 4:38 pm
Contact:

Post by jnjwebdev »

hotscripts gas quite a few News scripts under PHP>Scripts and Programs
Lixas
Posts: 750
Joined: Wed Feb 16, 2005 4:21 pm

Post by Lixas »

bangbanger wrote:im going to be putting a news script on my forum i think. anyone know where i can get the script?
Read a ltl bellow, and u find it, i believe in u :D
Image
toychoq
Posts: 108
Joined: Fri Apr 15, 2005 9:11 am

Post by toychoq »

can we use our own fonts which are very advanced ones
Post Reply