mercredi 17 juin 2015

How I redirected according to PHP?

I was trying to redirect according to a state in my BD (which is 0 ), but when changes to " 1" continues routing the welcome page .... The code I'm trying to use is this . I believe , but also what I believe is how it works ....

$hash = $loggedInUser->user_id; <<<<< This is the variable that I use to declare my User ID program

$tour1 = mysql_query("SELECT * FROM sqlusuarios_users WHERE id=".$hash ,$conexion);
$tour2 = mysql_fetch_array($tour1);


    if($tour2['tour'] == "0") {

            header("Location: bienvenido.php");
        } 

WHAT it IS WHAT I'M DOING WRONG !? thanks! hahahaha




Aucun commentaire:

Enregistrer un commentaire