Jump to content

Adding PM features


xoligy

Recommended Posts

Ok i have a simple private message system where you just type in the messaged and press send and the message is sent, now i want to add "Cc" to the send page and also the ability to quote a message from one page to the next. With the Cc i would like them to be able to add a "," to seperate the contacts so user1,user2 etc etc.

 

I have looked about but all the ones i have found have been for email, and none have said how to seperate with a commer thta i have seen :/ I take it nothing would have to be added to the db to add these features?

 

Anyway hope someone can help out :)

Link to comment
Share on other sites

Ok been trying to get the quote feature to work but seems im doing it completely wrong maybe someone can give me some guidence? On the mail page i have "quote" as a link that is linked to the id of the message so the link is as follows: <a href="out.php?pid=test2&tru=4&reply=103">quote</a> pid is the user, tru is the current round, reply is the message id.

 

I thought it would be as simple as adding $_GET['id']; but seems im doing it wrong and nothing is getting displayed when i echo the variable. So im guessing the info isnt getting passed along altho the address is as it shold be. Can someone please help out and give some guidence or like i asked before point me to tutorials that have the features im after? Ive looked but found nothing to help me :(

Link to comment
Share on other sites

post your code, and what you have tried.

 

Also, just ask one for help with one feature at a time dude. We aren't gonna teach you how to grow a forest but we can help you figure out why one of the seeds you planted isnt sprouting.

 

as for sending an email to multiple people here is an example of what your code might look like:

<?php
//assuming the user enters "admin@example.com,fake@fake.com,hi@hi.com" under the TO: section
$to = $_POST['to'];
$newto = explode(',',$to);
foreach ($newto as $indvidual){
     sendAnEmail();
}
?>

its pretty basic, but it should give you an idea.

 

HoTDaWg

 

Link to comment
Share on other sites

Thanks hotdawg as i said its for a pm system not for email, i will have a play with the code you gave tho and see if i can make something work. as for my code this is what i have:

 

<?php
if($send)
{
  if($src)
    {
        if ($msg == ""){ }
      else {
           mysql_query("UPDATE $tab[pimp] SET msg=msg+1, msgsent=msgsent+1 WHERE pimp='$pid'");
           mysql_query("UPDATE $tab[pimp] SET online='$time' WHERE id='$id'");
           $msg=filter($msg);
           mysql_query("INSERT INTO $tab[mail] (src,dest,msg,time,inbox,del,crew) VALUES ('$id','$src[1]','$msg','$time','inbox','no','$crw[0]');");
           $success=yes;
           }
    }
?>

 

As for why i asked for two in the same post it just makes sense to me tho i suppose it can be complicated if there are more so sorry :) Gonna see if i can get your code to work some how thanks :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.