Display html code with php

Associate
Joined
18 Oct 2002
Posts
1,581
Location
Nottingham
I am writing a blog for my girlfriend and i have included an image upload, when it has uploaded the image it display it display the url and says successful etc. But i also want it to echo the an img tag with the correct url in, but im not sure how to do it how when i echo it can i tell it to just display the code and not use it?
 
well thanks for the LARGE volume of replies lol, i figured out a way of doing it its kinda a work around but anyway all i did was whack a text area on the page and echo the code into that looks something like this:

around.jpg
 
Hi there,

I am not know for my great helpfullness but can you not do this:

Code:
<?php

echo '

?>

<img src="http://www.domain.com/image.jpg" />

<?php

';

?>

Please correct me if I am wrong PHP genius'

Thanks...
 
Sorry for my ignorance, didn't read the thread properly, never make assumptions :|.

Well you could try putting it in a text box, and then onclick it highlights it all :)

Like this:

Code:
<?php

//* Image Uploader Stuff *//

$code = //* generate image url code (including tags if needed) *//

echo'<input type="text" name="code" size="60" onfocus="this.select()" value="' . $code  . '">';

?>

Thanks...
 
Conrad11 said:
Sorry for my ignorance, didn't read the thread properly, never make assumptions :|.

Well you could try putting it in a text box, and then onclick it highlights it all :)

Like this:

Code:
<?php

//* Image Uploader Stuff *//

$code = //* generate image url code (including tags if needed) *//

echo'<input type="text" name="code" size="60" onfocus="this.select()" value="' . $code  . '">';

?>

Thanks...
http://forums.overclockers.co.uk/showpost.php?p=6479467&postcount=3

*whistles incoherrently*
 
If what I have already done is concidered htmlentities(), then ok........otherwise....nope it doesn't, at least not for me it doesn't. Works perfectly as it is :)

Thanks...

[edit]

wait ok, i understnad what you mean.....it's just when i form $code I put it in the correct format there......sorry
 
Last edited:
Back
Top Bottom