Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/09/2011, 08:45
Avatar de h2swider
h2swider
 
Fecha de Ingreso: julio-2007
Ubicación: Ciudad de Buenos Aires
Mensajes: 932
Antigüedad: 16 años, 9 meses
Puntos: 194
Respuesta: Problema Call to a member function bind_param() on a non-object

Estas biendeando mal los datos, intenta algo así.

Código PHP:
require_once('conexion.php');
$conexion conectar();
$id $_GET["id"];

$sql "SELECT EMAIL FROM USUARIO WHERE ID = :i";
$statement $conexion -> prepare($sql);
$statement -> bind_param(":i"$id);
$statement -> execute();
$statement -> bind_result($email);
$statement -> fetch();
$statement -> close();

if(isset (
$email)){
    
$sql "UPDATE USUARIO SET ESTADO = 1 WHERE ID = :i";
    
$statement $conexion -> prepare($sql);
    
$statement -> bind_param(":i",$id);

    if(
$statement -> execute()){
        echo 
"Bien";
    }
    
$statement -> close();
}
$conexion -> close(); 
__________________
Codifica siempre como si la persona que finalmente mantedra tu código sea un psicópata violento que sabe donde vives