mercredi 17 janvier 2018

mysql_query & mysql_num_rows will not find row in batabase

I've been working on this for quite a while, and I can't seem to figure out the issue. I pulled up PHPMyAdmin and did a query from the SQL tab - Works fine. I put the code in my .php file it doesn't work. I'm new to PHP, surely I am doing something wrong. Can someone help?

$query = mysqli_query("SELECT * FROM `invitee_data` WHERE `invite_codes`='$code'");


        if(mysqli_num_rows($query) > 0) {
            echo "<script type='text/javascript'>alert('$message2');</script>";
        }

Aucun commentaire:

Enregistrer un commentaire