cluce Posted June 9, 2008 Share Posted June 9, 2008 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: [email protected] 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 https://forums.phpfreaks.com/topic/109445-solved-rowdata-is-not-showing-data-correctly/ Share on other sites More sharing options...
cluce Posted June 9, 2008 Author Share Posted June 9, 2008 I SOLVED IT!!! I had a missing ' in the font tag for zip Link to comment https://forums.phpfreaks.com/topic/109445-solved-rowdata-is-not-showing-data-correctly/#findComment-561405 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.