![]() |
Help with Index and Mysqli error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Help with Index and Mysqli error (/showthread.php?tid=73957) |
Help with Index and Mysqli error - Mekaboo - 06-28-2019 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 RE: Help with Index and Mysqli error - InsiteFX - 06-29-2019 Why do you keep using old php code? If you need to use old code convert it to CodeIgniter. RE: Help with Index and Mysqli error - Mekaboo - 07-01-2019 (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-Request-using-Core-PHP RE: Help with Index and Mysqli error - jreklund - 07-01-2019 It's full of security holes, you need to rewrite it from scratch. RE: Help with Index and Mysqli error - Pehesis - 07-01-2019 The $_session['email'] does not exist find out why there is no $_session['email'] and it should fix your second problem RE: Help with Index and Mysqli error - InsiteFX - 07-02-2019 Most likely it is a facebook style time lime not a list. Look for a facebook style time line code for CodeIgniter. |