I have some simple php code that outputs a quiz and I would like to add photos to go along with each question. How do I do that?
How do I add a photo to my php code?
You could do:
echo "%26lt;img src='SRC_HERE'%26gt;";
Reply:Just as you would add a photo to ordinary HTML or XHTML. Use the %26lt;img%26gt; tag.
Reply:Please post the code and the file locations of the images you want to include. It is really just knowing the html. standard image insertion is:
%26lt;img src="images/myimage.jpg" /%26gt;
so if you are getting the image filename from a database, it should look something like:
%26lt;img src="images/%26lt;?php echo $yourquery['yourfilenamefield']; ?%26gt;" /%26gt;
Any questions, you can email or IM... email will always get a response, IM only if I am at the computer at the time..
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment