Foros del Web » Programando para Internet » PHP »

HELPPPPP PLZzZzZ! ;P

Estas en el tema de HELPPPPP PLZzZzZ! ;P en el foro de PHP en Foros del Web. Código: <? include("config.php"); $usr = $_COOKIE["unick"]; $mensajestag = mysql_query("select mensajestag from where nick='$usr'") ; $suma = ($mensajestag + "10"); mysql_query("update usuarios set mensajestag='$suma' where nick='$usr'"); ...
  #1 (permalink)  
Antiguo 16/08/2003, 16:32
 
Fecha de Ingreso: agosto-2003
Mensajes: 72
Antigüedad: 20 años, 8 meses
Puntos: 1
HELPPPPP PLZzZzZ! ;P

Código:
<?

include("config.php");

$usr = $_COOKIE["unick"];
$mensajestag = mysql_query("select mensajestag from where nick='$usr'") ;
$suma = ($mensajestag + "10");

mysql_query("update usuarios set mensajestag='$suma' where nick='$usr'");
mysql_close($conectar) ;

?>
¿alguien sabe por que no funciona?
no da ningun error ni nada, solo que no guarda los datos, no se si es que no suma bien o no los guarda bien, pero no funciona =S, ¿alguien sabe porque?
  #2 (permalink)  
Antiguo 16/08/2003, 17:18
Avatar de nuevo  
Fecha de Ingreso: mayo-2003
Ubicación: Spain
Mensajes: 2.009
Antigüedad: 20 años, 11 meses
Puntos: 2
Código PHP:
<?
$Err01 
"Error, no se pudo conectar con la Base de Datos, por favor, llame al Administrador de su Sistema....auuuaa...auuuuaa...auuuuaa....";
include(
"config.php");

$usr $_COOKIE["unick"];
$mensajestag mysql_query("select mensajestag from where nick='$usr'") or die($Err01);
$suma = ($mensajestag "10");

mysql_query("update usuarios set mensajestag='$suma' where nick='$usr'")or die($Err01);
mysql_close($conectar) ;

?>
mira, empieza por cambiar eso... osea, añadir el sistema de error

2º creo que tu problema esta aqui

$mensajestag = mysql_query("select mensajestag from where nick='$usr'")

select mensajestag from where

FROM que????? tendras que decirle el que.... digo yo no...

mira, prueba el codigo que te pase y dime si el error es en esa linea....


__________________
3w.valenciadjs.com
3w.laislatv.com
  #3 (permalink)  
Antiguo 16/08/2003, 17:23
 
Fecha de Ingreso: agosto-2003
Mensajes: 72
Antigüedad: 20 años, 8 meses
Puntos: 1
si el problema era ese, ya lo solucione antes, ahora el problema es que al hacer esto:

<?

include("config.php");

$usr = "Tebb";
$msgtagg = mysql_query("select mensajestag from usuarios where nick='$usr'") ;

echo"$msgtagg";

?>

me dice cuando lo ejecuto:

Resource id #2


Eso que es?
  #4 (permalink)  
Antiguo 16/08/2003, 17:24
 
Fecha de Ingreso: agosto-2003
Mensajes: 72
Antigüedad: 20 años, 8 meses
Puntos: 1
weno soy muy novato en esto del php, pero creo que se tiene que hacer un array o algo asi ¿no? si es asi decirme como plz y sino es eso pos no se que puede serrr....
  #5 (permalink)  
Antiguo 16/08/2003, 17:28
 
Fecha de Ingreso: agosto-2003
Mensajes: 72
Antigüedad: 20 años, 8 meses
Puntos: 1
Np problem solved,
hice esto:

Código PHP:
<?

include("config.php");

$usr "Tebb";
$msgtagg mysql_query("select mensajestag from usuarios where nick='$usr'") ;
$datos mysql_fetch_array($msgtagg) ; 

echo
"$datos[mensajestag]";
echo
"<br>";

$suma $datos[mensajestag] + "10";

echo 
"$suma";

mysql_query("update usuarios set mensajestag='$suma' where nick='$usr'");

mysql_close($conectar) ;

?>
era que necesitava una array para cojer los datos =D
  #6 (permalink)  
Antiguo 16/08/2003, 17:32
Avatar de nuevo  
Fecha de Ingreso: mayo-2003
Ubicación: Spain
Mensajes: 2.009
Antigüedad: 20 años, 11 meses
Puntos: 2
si, pero veo que sigues sin los errores....MUY MAL... :(
__________________
3w.valenciadjs.com
3w.laislatv.com
  #7 (permalink)  
Antiguo 16/08/2003, 17:34
 
Fecha de Ingreso: agosto-2003
Mensajes: 72
Antigüedad: 20 años, 8 meses
Puntos: 1
-.-
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:24.