Help with Index and Mysqli error |
Hey again
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 , Mekaboo
Why do you keep using old php code?
If you need to use old code convert it to CodeIgniter. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(06-29-2019, 08:52 AM)InsiteFX Wrote: Why do you keep using old php code? Im using code that I became interested in form Git. This was a repo for a friend's list (like in FB) that caught my eye. The situation is that I cant find many current tutorials pertaining to what I want that deals with CI. Will work on conversion for CI https://github.com/Ashyamkhan/Friend-Req...g-Core-PHP
The $_session['email'] does not exist find out why there is no $_session['email'] and it should fix your second problem
Most likely it is a facebook style time lime not a list.
Look for a facebook style time line code for CodeIgniter. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |