Need some with PHP coding

I got this PHP Warning: mysqli_error() expects parameter 1 to be mysqli, null given in

I am lost

here is the code for the record.php:

$sql = "SELECT * FROM words where word_id='".$rows['word_id']."'";
 $result = $conn->query($sql) or die($conn->error);

if ($result->num_rows > 0){
while($row = $result->fetch_assoc() )

Where are you magically coming up with $rows[‘word_id’] ?

Since you are just learning I would highly recommend you learn PDO.

Sponsor our Newsletter | Privacy Policy | Terms of Service