View Full Version : 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
anyone?
Luke
Editd by Yoshimitsui (Super Moderator): Please do not double post.
Jackboy
31-10-2008, 10:05 PM
Make it so that its like
<a href="message.php?name=$friendnamevariable[1]">$friendsnamevariable[1]</a>
Then on the page that u want it to be filled in just use
$sendto = Secure($_GET[name]);
echo ("<input type=text value=$sendto>");
Secure is your own securing function :D
Excellent2
31-10-2008, 10:07 PM
I'd just query the username and then fetch the array?
Jackboy
31-10-2008, 10:16 PM
I'd just query the username and then fetch the array?
I replied as if he had already done that lol..
:D
$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>
Thank you!
Worked a treat ;)
Jackboy
01-11-2008, 09:06 PM
Thank you!
Worked a treat ;)
No probs ;D
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.