Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2006
    Location
    D?sseldorf
    Posts
    2,858
    Tokens
    2,256

    Latest Awards:

    Default How can i do this?

    I'm in the process of making a friends system on my private messaging system.

    On the compose (pnew.php) page, there is the recieptant box,
    so how can i make it that when i click the friends name, it comes up with the compose page with the recieptant box already filled in.
    Something like pnew.php?name={username}

    To help
    Lets just say that the textbox is named "name"
    And the mysql db thing for username is "username"

    Thanks
    Luke

  2. #2
    Join Date
    Nov 2006
    Location
    D?sseldorf
    Posts
    2,858
    Tokens
    2,256

    Latest Awards:

    Default

    anyone?

    Luke

    Editd by Yoshimitsui (Super Moderator): Please do not double post.
    Last edited by Yoshimitsui; 02-11-2008 at 12:20 AM.

  3. #3
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Red face

    Make it so that its like

    PHP Code:
    <a href="message.php?name=$friendnamevariable[1]">$friendsnamevariable[1]</a
    Then on the page that u want it to be filled in just use

    PHP Code:
    $sendto Secure($_GET[name]);
    echo (
    "<input type=text value=$sendto>"); 
    Secure is your own securing function

  4. #4
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    I'd just query the username and then fetch the array?
    Back for a while.

  5. #5
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Excellent2 View Post
    I'd just query the username and then fetch the array?
    I replied as if he had already done that lol..



    PHP Code:
    $getusers mysql_query("SELECT * FROM `USERTABLE`");
    while (
    $allusers mysql_fetch_array($getusers)){
    echo 
    "<a href=\"message.php?name=$allusers[username]\">$allusers[username]</a><br>";

    SORRY if any of that is wrong. I know you could've probably used assoc and it would've worked faster but i am outa practise im afraid.
    </span></span>
    Last edited by Jackboy; 31-10-2008 at 10:18 PM.

  6. #6
    Join Date
    Nov 2006
    Location
    D?sseldorf
    Posts
    2,858
    Tokens
    2,256

    Latest Awards:

    Default

    Thank you!

    Worked a treat

  7. #7
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by yabberer View Post
    Thank you!

    Worked a treat
    No probs ;D

Posting Permissions

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