Putting an <img> tag in a text field
Posted: Mon Nov 29, 2010 7:27 am
Ok, apologies if this is really basic knowledge - but I am just starting out with PHP.
What I'm trying to do is save some text (that contains "<img>") into a text field.
Putting it all in inverted commas doesn't seem to work properly, so is there any way of doing this?
My code is:
if(!$_POST['newsimg'])
{
$_POST['newsimg'] = "<img src="www.shotguneffect.com/news_feed/images/ ... efault.jpg" alt="" /img>";
}
What I'm trying to do is save some text (that contains "<img>") into a text field.
Putting it all in inverted commas doesn't seem to work properly, so is there any way of doing this?
My code is:
if(!$_POST['newsimg'])
{
$_POST['newsimg'] = "<img src="www.shotguneffect.com/news_feed/images/ ... efault.jpg" alt="" /img>";
}