Results 1 to 2 of 2

Thread: UPDATE Query displaying duplicate data

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    95

    UPDATE Query displaying duplicate data

    Heres the code im currently in progress with:

    Cpanel.php: ( http://lockpick.lukeidiot.com/?go=cpanelpreview )
    PHP Code:
    <p><strong><strong>
      <?
     $_SESSION['username'] = $username;
     echo 'Welcome <b>'. $_COOKIE['username'].'</b><br />'; ?>
      <?php
     $iplog 
    $_SERVER['REMOTE_ADDR'];
     
    $sql mysql_query("SELECT * FROM users");
     while(
    $result mysql_fetch_array($sql)) {
     if (!empty(
    $online['id'])){ 
    # Check to see if they're logged in 

    echo 'Welcome <b>'.stripslashes($online['username']).'</b><br />'
    # An example of how to display the browsing members name 

    else { 
    # Else, they are not logged in. 
    echo 'You must be logged in to access this page.'
    ?>
      </strong>Profile</strong> | <strong><a href="?go=memberlist">Memberlist</a></strong> | <strong><a href="?go=logout">Logout</a></strong><br>
       <strong><br>
       Account Type: </strong>Admin/Staff/Moderator/Customer 
      <strong><br>
      Job Position:</strong> <?php echo 'Account type: <b>' .$result['type'] . '</b>'; }?><br>
      <strong>Job Status:</strong> Accepted <br>
      <strong>Payout</strong>: $<?php echo '<b>'.$result['payout'] . '</b>'; }?><br>
      <strong>Signup Date:</strong> 
      <?=$signup?>
      <br />
      <strong>IP Logged:  </strong><?php echo '$iplog';?><br>
      <strong>Resume:</strong> http://lockpick.lukeidiot.com/upload/example.doc</p>
    And it displays this:
    User Selected: Lukeidiot
    Account type: AdminAccount type: CustomerAccount type: CustomerAccount type: CustomerAccount type: Customer
    Any idea why this is happeing?

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: UPDATE Query displaying duplicate data

    Fist of all, fix all those errors on you page. Several of those errors indicate that the queries may not have been successful. Secondly, there is no update query in your code and it appears to bear no relation to the code you posted.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width