Posted on Saturday 2nd June 2007 at 11:22 PM | |
Diablosblizz Senior Member |
Hey, I am trying to make a PM system for my site. The only problem is how do I get the ID!!! I will make the ID the primary key, but there are multiple users, so how would I get the ID that matches with the users Username? I am lost and I don't understand what I am susposed to do. DanielXP said to use this: PHP Code
1 2
$id = (int)$_GET['id'];
But I don't understand how that will get the ID from the mysql and target the user to their message. Please help! |
Posted on Sunday 3rd June 2007 at 12:47 AM | |
SkillMaster Senior Member |
You wouldn't use id. Use their username. Much easier. |
Posted on Sunday 3rd June 2007 at 01:02 AM | |
Diablosblizz Senior Member |
I just don't understand how I would get it to show one message of the 5 that they will be allowed to store. |
Posted on Sunday 3rd June 2007 at 04:57 AM | |
SkillMaster Senior Member |
Well in the pm you would do. PHP Code
1 2 3
$fetch = mysql_query("SELECT * FROM `DBNAME` WHERE `to` = '$logged[username]' LIMIT 0, 1");
\"to\" is like the message recepient so change it accordingly. |
Posted on Wednesday 6th June 2007 at 03:01 PM | |
DanielXP Senior Member |
PHP Code
1 2 3 4 5 6 7 8 9 10 11
<?
|