Jump to content

confused


Rhillman81

Recommended Posts

You were trying to pass a mysql query where it needed to be a query string

 

Try this instead

<?php
include 'connect.php';

$query = "SELECT * from player where name='Kronus'";
if ($result = mysqli_query($conn, $query)) {

if(mysqli_num_rows($result) > 0){

while ($row = mysqli_fetch_assoc($result)) {
echo "Kronus's email is " . $row['email'];
} 

} else {
die ("could not select players");
}
    
} else {
die ("query failed");
}

mysqli_close($conn);
?>
Link to comment
https://forums.phpfreaks.com/topic/292818-confused/#findComment-1498163
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.