Jump to content

[SOLVED] .$row[data] is not showing data correctly


cluce

Recommended Posts

The problem I am having is in my .$row[zip] is showing A phone number from the databaase instead of the zip.  I cant see what I am doing wrong. Can soemone help me with this? Thanks

 

my output looks like this....

 

Username: misamis

Full name: Chris Sam

Address: 5501 lemon Drive

City: indiana

State: LA

Zip: 504-123-1234////this should be zip code???

///missing phone number here????

Alternate Phone Number: 985-123-1234

Email: c@yahoo.com

Company: Company:

Last successful login: Jun 9 2008 at 03:39:42 PM

 

here is my code 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.