Jump to content

[SOLVED] php error???


cluce

Recommended Posts

Can someone help me fix my errors?

 

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\www\vhosts\reagan\empInfo.php5 on line 19

 

Notice: Undefined index: update in C:\www\vhosts\reagan\empInfo.php5 on line 134

 

here  is my cod below:

    
<?php

//create query and retrieve record of user logged on 
//create and issue the query
   $SQL = "SELECT username, first_name, last_name, address, city, state, zip, phone, altphone, email, company, DATE_FORMAT(last_login,  '%b %e %Y at %r') aS last_login FROM auth_users WHERE username = '".$_SESSION['identity']."'";
   $result = mysqli_query($mysqli,$SQL);
   $row = mysqli_fetch_array($result);

    echo "<strong>Username:</strong> "."<font color='blue'>".$row['username']."</font>";
  echo "<br />";
    echo "<strong>Full name:</strong> "."<font color='blue'>".$row['first_name'] . " " . $row['last_name']."</font>";
  echo "<br />";
    echo "<strong>Address:</strong> "."<font color='blue'>".$row['address']."</font>";
  echo "<br />";
    echo "<strong>City:</strong> "."<font color='blue'>".$row['city']."</font>";
  echo "<br />";
    echo "<strong>State:</strong> "."<font color='blue'>".$row['state']."</font>";
  echo "<br />";
    echo "<strong>Zip:</strong> "."<font color='blue'>".$row['zip']."</font>";
  echo "<br />";
    echo "<strong>Phone Number:</strong> "."<font color='blue'>".$row['phone']."</font>";
  echo "<br />";
    echo "<strong>Alternate Phone Number:</strong> "."<font color='blue'>".$row['Altphone']."</font>";
  echo "<br />";
    echo "<strong>Email:</strong> "."<font color='blue'>".$row['email']."</font>";
  echo "<br />";
    echo "<strong>Company:</strong> "."<font color='blue'>".$row['company']."</font>";
  echo "<br />";
    echo "<strong>Last successful login:</strong> "."<font color='blue'>".$row['last_login']."</font>";
  echo "<br />";
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.