PHP & HTML links,images,etc.

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
BETA
Forum Commoner
Posts: 47
Joined: Fri Jul 25, 2008 3:21 am

PHP & HTML links,images,etc.

Post by BETA »

Ok im here again with this... for my news system.
I have it working right.
But i came to this point where security is ruining functionallity. :|
Let's say i have this $message = $_POST['message'];
and message is:
<a href="#">link</a>
Then it is well displayed as normal html and it is saved in DB as is.
But when using:
$message = mysql_real_escape_string($_POST['message']);
and message is:
<a href="#">link</a>
output looks correct like a normal link but its route is
http://www.otakunosekai.es/noticias/\"#\"
and it is saved in DB as <a href=\"#\">link</a>
so link doesn't work...
Any ideas?

Thx in advance guys!
BETA
Forum Commoner
Posts: 47
Joined: Fri Jul 25, 2008 3:21 am

Re: PHP & HTML links,images,etc.

Post by BETA »

Ok i managed to figure out a solution :P
Stripslashes() when outputting did the work.
Thx anyway!
Post Reply