Jump to content

Pm question


onthespot

Recommended Posts

Hey guys, I have a fully functional messaging system.

What I am now trying to do is provide a direct link on users profiles for them to PM someone.

Obviously this would bring up the new_message.php page, but the dropdown menu would have the player that they want to message automatically selected.

How would I go about doing this?

What code would I need to supply for you to help me on this?

Thanks

Link to comment
https://forums.phpfreaks.com/topic/170384-pm-question/
Share on other sites

If i did that, when they want to send a message just from the pm system itself without the GET, would it just default to the top of the list?

So would doing it your way in effect make the dropdown select the correct player?

How would this work if i wanted to reply?

Use the from part of the message and GET that too?

Link to comment
https://forums.phpfreaks.com/topic/170384-pm-question/#findComment-898803
Share on other sites

<?php
    $res=mysql_query("SELECT username FROM ".TBL_USERS." WHERE username != '".$_SESSION['username']."'") or die(mysql_error());
  while($row=mysql_fetch_assoc($res)){
    $username=htmlspecialchars($row['username']);
    echo "<option value=\"$username\">$username</option>";
  }
?>

 

This is my existing code which brings up all users from my database.

 

Howver I want to be able to reply to messages, or put links on profiles for SEND PM, to that specific user.

 

How could I edit this code so that it will preselect the appopriate user from the dropdown?

Link to comment
https://forums.phpfreaks.com/topic/170384-pm-question/#findComment-898836
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.