Welcome Guest, Not a member yet? Register   Sign In
Help with Index and Mysqli error
#1

Hey again Blush 

I got these 2 errors and wanted to see how to fix them:

1.
Severity: Notice

Message: Undefined index: email

2.
Severity: Warning

Message: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given



For these lines of code:
$email=$_SESSION['email'];
$sql1="select * from users where user_email='$email'";
$run=mysqli_query($con,$sql1);
echo "<h1>List of friends</h2>";
while($row=mysqli_fetch_array($run))
{
 $id=$row['id'];
$sql="select * from friend where receive_request='$id' and status='1'";
$run1=mysqli_query($con,$sql);
while($row1=mysqli_fetch_array($run1))
{
    $name=$row1['request_sent'];
    $sql2="select * from users where user_email='$name'";
    $run2=mysqli_query($con,$sql2);
    while($row2=mysqli_fetch_array($run2))
    {
        $namee=$row2['user_name'];
        echo $namee."<br/>";
    }

How to fix these? Thank ya kindly

Heart Heart ,
Mekaboo
Reply


Messages In This Thread
Help with Index and Mysqli error - by Mekaboo - 06-28-2019, 02:18 PM
RE: Help with Index and Mysqli error - by Mekaboo - 07-01-2019, 10:03 AM
RE: Help with Index and Mysqli error - by Pehesis - 07-01-2019, 11:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB