[SOLVED] HTML inside a textbox
Posted: Tue Jul 31, 2007 9:48 pm
I have written an image uploading script. When the user uploads an image, I then want to be able to present the code for HTML BBCode and the plain old URL. BBCode and URL have been simple, but I have been having trouble with HTML.
The value of the textbox ends up being '<img src=' and outside the box is '" />'.
Can anyone see what I am doing wrong?
Code: Select all
$imageurl = 'upload/' . $rand . '.' . $ext;
$imagepath = 'http://' . $_SERVER['HTTP_HOST'] . '/roundup/' . $imageurl;
// usual urls look like http://localhost/roundup/upload/9845897.jpg
echo '<input type="text" size=70% name="" value="<img src="' . $imagepath . '"></img>" />';Can anyone see what I am doing wrong?