Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

Any Reason my Read-DB Code Doesn't Display Actual Values?

PHP Code

<?php 
  
<div class="container" style="position: center; margin-left: 800px">
 
  <div class="col-xs-6">
 
   <?php 
      
     $con 
= mysqli_connect('localhost', 'root', '', 'loginapp');
 
    $query = "SELECT * FROM users";
 
    $result = mysqli_query($con, $query);
 
    
     
if(!$result) {
 
        echo "WE JUST CAN'T DO IT, SCOTTY";
 
    }
 
   
    else
{
 
        while($row=mysqli_fetch_row($result)) {
 
              print_r($result);
 
          }
 
   
}
 
         
       
       ?>
    </div>
    </div> 

Quote:Spoiler (Click to View)

Resident Writer for MyGamer.Com and Horrify.Net
PHP Code

<?php 
while($row=mysqli_fetch_assoc($result)) {
               
print_r($row);
           } 
You see, Doctor, God didn't kill that little girl. Fate didn't butcher her and destiny didn't feed her to those dogs.
If God saw what any of us did that night he didn't seem to mind. From then on I knew... God doesn't make the world this way.
We do.
(Jan 25, 2019 05:20 AM)Squito Wrote:  
PHP Code

<?php 
while($row=mysqli_fetch_assoc($result)) {
 
              print_r($row);
 
          } 

I'm an idiot haha. Thanks a lot, Squito.
Resident Writer for MyGamer.Com and Horrify.Net


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by faxxgridApr 30, 2020 11:45 AM 15 363 Apr 30, 2020 11:45 AM
Last Post: faxxgrid
[PHP] by PerformanceDirectUSADec 9, 2018 06:45 PM 3 177 Dec 9, 2018 06:45 PM
Last Post: PerformanceDirectUSA
[PHP] by Pim FortuynMay 9, 2018 11:47 AM 10 388 May 9, 2018 11:47 AM
Last Post: Pim Fortuyn