Spartan 117 Posted March 8, 2007 Share Posted March 8, 2007 Hello, I am currently working on a website that will be integrating with a Simple Machines Forum. I want to make a messaging system, but why not just use the smf pm system? It will be easier and it will be better so users don't get confused with forums pms and site pms. Here is what I would like to do: Message Title: Message Content From: Username, Date & Time [Delete] [Reply] Can this be done in a way like this? I have looked in my database and see that there are two tables for private messages: smf_personal_messages: ID_PM ID_MEMBER labels bcc is_read deleted And smf_pm_recipients: ID_PM ID_MEMBER_FROM deletedBySender fromName msgtime subject body The first one contains who wrote it, the time, and the message, the second one contains who the message was sent to. I would need to get the users id that is logged in, which would be simple enough with SSI. But I would also need to then check if that member id has any messages from the recipients table. If there is a message with their id then go into the first table and gather the info from the message with that id. What I would like to know is how to do this. I know I would probably need an array, but I am new to arrays... How would I check to see if there is any messages for the user logged in? i'd have to check smf_pm_recipients under ID_MEMBER and see if there are some (or 1) that equals the id of the member logged in, and if so get the ID_PM and check the smf_personal_messages under ID_PM and gather the information for that. But it is all confusing. I have sat here reasoning it for about twenty minuts and cnnot think how I will accomplish it. Could somebody please help me? Thanks Link to comment https://forums.phpfreaks.com/topic/41793-array-help/ Share on other sites More sharing options...
Spartan 117 Posted March 8, 2007 Author Share Posted March 8, 2007 I could do something like this for when I list them... echo('<table width="241" height="80" border="0" cellpadding="0" cellspacing="0">'); echo('<tr><td><p><b>Title:<br></b>$message<br><b>From: </b><i>'.$userfrom.',</i><b> On:</b><i> '.$time.'</i></p></td></tr>'); echo('</table>'); lol, but I have no idea how to get $message, $userfrom, and $time! Link to comment https://forums.phpfreaks.com/topic/41793-array-help/#findComment-202688 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.