0

Hi im ageeting the following error in my script can anyone find a fix or solution hus jan x

Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/letsswin/public_html/template_pageTop.php on line 7

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/letsswin/public_html/template_pageTop.php on line 8

//check for new pm's
$pm_n = '<img src="images/pmStill.gif" width="17" height="12" alt="Pm" title="This pm is for logged in members">';
$sql = "SELECT id FROM pm WHERE (receiver='$log_username' AND parent='x' AND rdelete='0' AND rread='0') OR (sender='$log_username' AND sdelete='0' AND parent='x' AND hasreplied='1' AND sread='0') LIMIT 1";
    $query = mysqli_query($db_conx, $sql);
    $numrows = mysqli_num_rows($query);
    if ($numrows > 0) {
        $pm_n = '<a href="pm_inbox.php?u='.$log_username.'" title="Private Message Notifier"><img src="images/pmflash.gif" width="17" height="12" alt="Pm"></a>';
    } else {
        $pm_n = '<a href="pm_inbox.php?u='.$log_username.'" title="Private Message Notifier"><img src="images/pmstill.gif" width="17" height="12" alt="Pm"></a>';
    }
2
Contributors
2
Replies
33
Views
2 Years
Discussion Span
Last Post by Teri_1
0

can you assist me with the solution?
im following the same tutorial and i cannot seem to get this functioning.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.