To expand upon hernst42's answer, if the images are loaded in the database, you have two options.
1) During page load, use PHP to query the database for the image file name. Dynamically create javascript function using the image file name:
<script type="text/javascript">
function showImageOne() {
document.getElementById('i
}
</script>
2) Use ajax to grab the other images filenames. If you're new to php/ajax, method 1 is probably the easiest.
Main Topics
Browse All Topics





by: hernst42Posted on 2007-05-25 at 09:23:09ID: 19158125
It's not realy a php-question, more javascript like this in HTML:
ntById('di splayimg') .src='2ndi mg.gif'"> ntById('di splayimg') .src='3ndi mg.gif'">
<img id="displayimg" src="1stimg.gif">
<input type="radio" name="x" value="1" onclick="document.getEleme
<input type="radio" name="x" value="2" onclick="document.getEleme