Ver Mensaje Individual
  #10 (permalink)  
Antiguo 18/01/2010, 13:22
reners
 
Fecha de Ingreso: enero-2010
Mensajes: 18
Antigüedad: 14 años, 3 meses
Puntos: 0
Respuesta: Problema con consulta SQL/formulario php

No se como he echo pero lo he logrado, lo dejo por si alguna vez la hace falta a alguien algo parecido
Código PHP:
<!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>
<!--  123TICKET SCRIPT TO PROTECT YOUR PAYZONE AREA -->
<noscript>
<meta http-equiv="Refresh" content="0;URL=http://www.123ticket.com/Public_IA/check/error_code.php?IDS=50657&IDD=58954">
</noscript>
<script language="Javascript" src="http://www.123ticket.com/Public_IA/check/chk.php?IDS=50657&IDD=58954"></script>
<!--  END : 123TICKET SCRIPT -->
</head>
<?php
require "head.php";
?>


<body>
<p align="center"><img border="0" src="webzenlogo.jpg" width="256" height="195"><br>
<center><b>Escribe el nombre de tu cuenta</b><br>
<form method="get" action="<?php echo $_SERVER['PHP_SELF'];?>">
<input type="text" name="input" />
<input type="submit" name="submit" value="Go" />
</form></center>

<?PHP

if (isset($_GET['input'])){
$useracc $_GET['input'];
$conexion mysql_connect("8IP""USERMYSQL""PASSMYSQL");
mysql_select_db("realmd"$conexion);
$sql_check mysql_query("SELECT id FROM account where username='$useracc'");
//funcionara?
$row mysql_fetch_assoc($sql_check);
        
$id $row["id"];
$cred mysql_query("SELECT points from voting_points where id='$id'");
$rowp mysql_fetch_assoc($cred);
        
$pactual $rowp["points"];
$puntosasumar 150;
$allcsp $pactual+$puntosasumar;
$exe_credit mysql_query("UPDATE voting_points Set points='$allcsp' Where id='$id'");
}

?>
</body>
</html>
David, muchísimas gracias por tu interés, hoy he aprendido a conocer mis errores y a intentar solucionarlos :P