Hi.
Welcome to PHPBuilder.
I hope this helps...
<?php
// if the form has not been posted, display the form:
if(!isset($_POST['submit']))
{
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<table cellpadding="5" cellspacing="0" border="0">
<tr>
<td><img src="http://i17.photobucket.com/albums/b69/Mhsjrotc/ar2.gif" alt="N-1-1" border="0" /></td>
<td>
<input type="checkbox" name="awards[1]" value="dsc" />
Distinguished Cadet
</td>
</tr>
<tr>
<td><img src="http://i17.photobucket.com/albums/b69/Mhsjrotc/ar3.gif" alt="N-1-2" border="0" /></td>
<td>
<input type="checkbox" name="awards[2]" value="aew" />
Academic Excellence
</td>
</tr>
<tr>
<td><img src="http://i17.photobucket.com/albums/b69/Mhsjrotc/ar4.gif" alt="N-1-3" border="0" /></td>
<td>
<input type="checkbox" name="awards[3]" value="aar" />
Academic Achievement Ribbon
</td>
</tr>
</table>
<br />
<input type="submit" name="submit" value="Create Rack!" />
</FORM>
<?php
}
// else, process the submitted data:
else
{
if(!isset($_POST['awards']))
{
echo 'You did not make a selection. Please go back.';
}
else
{
// array of images:
$images[1] = 'http://i17.photobucket.com/albums/b69/Mhsjrotc/ar2.gif';
$images[2] = 'http://i17.photobucket.com/albums/b69/Mhsjrotc/ar3.gif';
$images[3] = 'http://i17.photobucket.com/albums/b69/Mhsjrotc/ar4.gif';
// loop through the posted values:
foreach($_POST['awards'] as $key=>$value)
{
echo '<img src="'.trim($images[$key]).'" alt="'.$value.'" /><br />'."\n";
}
}
}
?>