Store HTML tags in PHP variables
Posted: Sat Jan 07, 2006 2:10 pm
How do i do that
Currently, I have this text feild.
Mind you that $image is = to "Yes"
But the result: Inside the text field: <img src= and right next to it outside: " size="70" /> and it also displays the picture.
I want it to just display the HTML code for an image source in a textfield. I think the " inside the <img src="> tag is what's causing the problem.
Any help would be apreciated.
Thanks.
Currently, I have this text feild.
Code: Select all
?>
<input name="textfield3" type="text" class="style18" id="textfield3" onfocus="this.blur()" value="
<?php
if ($image == "Yes")
$img_src = '<img src="http://www.fastfragclan.com/files/usr_ul/'.rawurlencode($name).'" />';
echo $img_src;
?>
" size="70" />But the result: Inside the text field: <img src= and right next to it outside: " size="70" /> and it also displays the picture.
I want it to just display the HTML code for an image source in a textfield. I think the " inside the <img src="> tag is what's causing the problem.
Any help would be apreciated.
Thanks.