Results 1 to 6 of 6

Thread: profile script

  1. #1
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default profile script

    i need the code that if its share.php?colin it shows just colin's info can anyone help?
    PHP Code:
    <?php
    include 'config.php';

    if(
    $_GET[user]) {

    $query mysql_query("SELECT * FROM profile WHERE name='$_GET[name'");)

    $query  "SELECT name, lname, age FROM profile";
    $result mysql_query($query);

    while(
    $row mysql_fetch_array($resultMYSQL_ASSOC))
    {
        echo 
    "Name:{$row['name']} <br>" .
             
    "Last Name: {$row['lname']} <br>" .
             
    "Age: {$row['age']} <br><br>";
    }
    ?>
    Last edited by Colin-Roberts; 10-03-2007 at 06:34 PM.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  2. #2
    Join Date
    Nov 2005
    Posts
    807
    Tokens
    1,335

    Latest Awards:

    Default

    try this... [php]

  3. #3
    Join Date
    Nov 2005
    Posts
    807
    Tokens
    1,335

    Latest Awards:

    Default

    Okay so I cant edit above post .. so try this try this...
    PHP Code:
    <?php
    include 'config.php';

    if(
    $_GET[user]) {

    $query mysql_query("SELECT * FROM profile WHERE name='".$_GET['name']."'");

    $result mysql_query($query);

    while(
    $row mysql_fetch_array($resultMYSQL_ASSOC))
    {
        echo 
    "Name:{$row['name']} <br>" .
             
    "Last Name: {$row['lname']} <br>" .
             
    "Age: {$row['age']} <br><br>";
    }
    }
    ?>
    Last edited by Splinter; 10-03-2007 at 07:33 PM.

  4. #4
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    nope thanx tho

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  5. #5
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    You cant have share.php?colin it has to be share.php?user=colin

  6. #6
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    ye sry thats what i ment it needs to be
    so if you go to show2.php?user=colin
    it shows my info in a chart like this:
    http://colin-roberts.net/v2/show.php
    and you change colin to say lainie it shows lainies info
    if you trusted i can give you cpanel to get it to work.
    + rep to whoever
    Last edited by Colin-Roberts; 10-03-2007 at 08:33 PM.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


Posting Permissions

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