Con respeto, te modifique partes,porq me pareces q estas equivocado como pasas el id para aceptar el voto
    
Código PHP:
Ver original- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
- <html xmlns="http://www.w3.org/1999/xhtml">  
- <head>  
- <?php  
- if (!$link)  
-    echo "No se pudo conectar correctamente con la Base de datos";  
- }  
- ?>  
-   
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />  
- <title>Documento sin título</title>  
- </head>  
-   
- <body>  
-   
-    <br />  
-    <form id="busca_imagenes" name="busca_imagenes" method="post" action="">  
-    <fieldset>  
-   <table width="200" border="0" align="center">  
-       <tr>  
-         <td>Nombre Artista</td>  
-         <td><input type="text" name="nombre_artista" id="nombre_artista" /></td>  
-         <td> </td>  
-       </tr>  
-       <tr>  
-         <td>Colegio</td>  
-         <td><label for="colegio_artista"></label>  
-           <input type="text" name="colegio_artista" id="colegio_artista" /></td>  
-         <td><input type="submit" name="Buscar" id="Buscar" value="Buscar" /></td>  
-       </tr>  
-       <tr>  
-         <td>Curso</td>  
-         <td><label for="curso_artista"></label>  
-           <input type="text" name="curso_artista" id="curso_artista" /></td>  
-         <td> </td>  
-       </tr>  
-   </table>  
-   </fieldset>  
- </form>  
-   
- <?php  
-   
- if ($_POST['Buscar'])  
- {  
-       
-         if ($_POST['nombre_artista'])  
-     {  
-         $buscar_nombre_artista="select artista.*, pinturas.* from artista, pinturas where artista.id_artista=pinturas.id_artista and artista.nombre_artista='".$_POST['nombre_artista']."' and pinturas.id_artista=artista.id_artista";  
-           
-                 {  
-                     echo "<form id='imagenes' name='imagenes' method='post' action=''>";  
-                     echo '<center><img src="'.$row['PINTURA_URL'].'"></img></center>';  
-                     echo '<center>Nombre: '.$row['NOMBRE_ARTISTA'].'</center>';  
-                     echo '<center>Curso: '.$row['CURSO_ARTISTA'].'</center>';  
-                     echo '<center>Colegio: '.$row['COLEGIO_ARTISTA'].'</center>';  
-                     //echo "<center><input type='Submit' name='Algo' value='Algo' /></center>";  
-                     ?>  
-                     
- <center> <input type="hidden" name="idpintura" value="<?php echo $row['ID_PINTURA'];?>"/></center>  
- <center> <input type="submit" name="Votar" value="Votar"/></center>  
-                     <?php  
-                     echo "</form>";  
-   
-                 }  
-                                                  
-     }  
-   
-   }                
-                  if(($_POST['Votar'])=="Votar")  
-                 {  
-                     //header('Location: res.php');  
-                     ?>  
- <SCRIPT LANGUAGE="javascript">  
-        alert('Gracias por Votar');  
-                                                       
-    </SCRIPT>  
-     <?php  
-                       
-                     $votos = $votos + 1;  
- // actualizo la base de datos  
-   
-   
-                  
-           
-     }  
-       
-       
-   
- ?>  
-   
- </body>  
- </html> 
