Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Location
    Shropshire
    Posts
    1,590
    Tokens
    357
    Habbo
    MailOffice

    Latest Awards:

    Default Simple(ish) Help

    So i've got a database with 'username, password, email & currency'.
    Im a PHP noob i admit that, but im looking for a little help.

    I want to show on my page, the 'currency' from the 'username' that is currently logged in if you get me? Somebody fancy giving a Noob a head in the right direction.


    .xo

  2. #2
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Sorry for the delay

    Try this but changing the table name and $username variable of course..

    PHP Code:
    <?php

    $query 
    mysql_query"SELECT `currency` FROM `table_name` WHERE `username` = '" $username "'" );

    $fetch mysql_fetch_assoc$query );

    echo 
    $fetch'currency' ];

    ?>
    Last edited by Invent; 11-10-2008 at 05:30 PM.

Posting Permissions

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