Ver Mensaje Individual
  #22 (permalink)  
Antiguo 08/02/2009, 10:48
Avatar de tata009
tata009
 
Fecha de Ingreso: septiembre-2008
Ubicación: En mi casa
Mensajes: 426
Antigüedad: 15 años, 7 meses
Puntos: 3
Respuesta: votacion y/o puntaje

ahh, ahi lo mejore un poco , pero ahora me registra dos veces el mismo id_post

Código PHP:
<?


include("config.php");


$silla mysql_query("SELECT * FROM puntos");

$tuplas mysql_num_rows($silla);

if(!
$tuplas[id_post]){



mysql_query("INSERT INTO puntos (id_usuario, nombre_post, id_post, puntos) VALUES ('$_GET[id_usuario]', '$_GET[nombre_post]', '$_GET[id_post]', '$_GET[puntos]')");

mysql_query("UPDATE usuarios SET puntos=(puntos-$_GET[puntos])");


echo
'<script>
alert("Puntos agregados");

</script>'
;



}


else

{

mysql_query("UPDATE puntos SET puntos=(puntos+$_GET[puntos])");

mysql_query("UPDATE usuarios SET puntos=(puntos-$_GET[puntos])");


echo
'<script>
alert("Puntos agregados");

</script>'
;


}

?>
__________________
SI pones un CD de MIcrosoft al reves aparecen mensajes satanicos pero si lo pones a la derecha PEOR SE TE INSTALA WINDOWS!!!!
Para webmasters e informaticos