Código PHP:
<center>
<p><strong>Are looks supposed to matter?No. Will we be judged by them? Yes.
<p><strong>Who's hotter? Click to choose</strong></p>
<table align="center" width="410" border="0" cellspacing="5" cellpadding="5" height="250" cellspacing="0" cellpadding="0">
<tr><td width="200">
<?php
$datos=mysql_query("select * from fotos where id='$id1'");
if($foto1=mysql_fetch_array($datos)){
echo "<form method='post' action='' name='form1'><input type='image' name='foto1' src='fotos/".$foto1[nombre].".".$foto1[formato]."' width='200' height='250' onsubmit=$votar></form>";
function votar($votar){
$votar=mysql_query("update fotos set votos='$foto1[votos]'+1 where id='$id1'");
}
}
?>
</td>
<td width="10">Or</td>
<td width="200">
<?php
$datos2=mysql_query("select * from fotos where id='$id2'");
if($foto2=mysql_fetch_array($datos2)){
echo "<form method='post' action='' name=form2><input onsubmit=$votar2 name='foto2' type='image' src='fotos/".$foto2[nombre].".".$foto2[formato]."' width='200' height='250'></form>";
}
?>
</td></tr></table>
</center>
<hr id="menu_bottom">
<table align="center" border="0" width="100%">
<tr><td align="right" width="50%"><a style="margin:50px;" href=top10.php>Top 10 </a></td><td align="left"><a style="margin:50px;" href="submit.php"> Submit Video </a>