Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 159
1 Users 10 Guests Online

Mass PM

Here is a Mass PM system i made and should work for Daniel's PM system when he gets around to coding it!

PHP Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?
session_start
();
include(
'config.php');
if(
$logged[username] && $logged[userlevel] == 6) { // Verifys Admin

if(!$_POST[submit]) {
echo(
'<form method=\"POST\">
    <p><input type=\"text\" name=\"title\" size=\"20\"><br>
    <br>
    <textarea rows=\"2\" name=\"message\" cols=\"20\"></textarea></p>
    <p><input type=\"submit\" value=\"Submit\" name=\"submit\"></p>
</form>'
);
} else {
$title $_POST['title'];
$message $_POST['message'];

$getmembers mysql_query("SELECT * FROM members"); 
while(
$r mysql_fetch_array($getmembers)){ 

$spm mysql_query("INSERT INTO `pmessages` ( `title` , `message` , `to` , `from` ) VALUES ('$title','$content','$r[username]','$logged[username]'") or die();

echo(
"Sent to $r[id] $r[username]<br>");// Shows who it has been sent to.
}
}
?>


This has not been tested yet.

Adam
Overload
Author:
Views:
2351
Rating:
Posted on Wednesday 20th June 2007 at 12:08 PM
fryser
fryser
Heh? remplace "sessionstart();" with "session_start();"
lol
Posted on Friday 16th March 2007 at 04:12 PM
Joshua
Joshua
Alright.
Overload, this is just what I was trying to say.
When you are posting a tutorial, Explain it more, or I will not accept it, tutorials are for people who look towards it, yes, I know that Copy and Pasters are people too, but they do not learn the value of coding PHP. And I don't care if you say I was "annoying" you because I said you did this for points, if you have of wanted to get the credit for actually making this, I would have better explained it and tested it. I don't care if you didn't have the other user system, try not and be lazy next time and actually do it yourself.

Josh
Posted on Thursday 15th March 2007 at 06:28 PM
ShadowMage
ShadowMage
I shall take a look at both of them and compare them side by side when i get home this afternoon.
Posted on Thursday 15th March 2007 at 06:12 PM
Overload
Overload
Jeez -.- now im ripping i take it?
Posted on Thursday 15th March 2007 at 04:55 PM
Dean
Dean
looks very similar to the one posted on techtuts :|
Posted on Thursday 15th March 2007 at 12:50 PM
Overload
Overload
I did not add it for points ... thats just sad i honestly could not care about points ... i added it to help people, copy & pasters our attual people who want to learn PHP. I can't test this as i dont have the specific usersystem for this ... My friend needed this script so he'll test it for me ... It should 100% work .. and you kinda annoyed me trying to say i only posted this for points!!!

Adam
Posted on Wednesday 14th March 2007 at 11:12 PM
Joshua
Joshua
You did not correctly explain the MASS PM, and the "This has not been tested yet." tells us that you are just in the tutorial adding for the points, not to help people, if you were to have checked it, like everyone else does with their tutorial, you might get a bit more credit, but yes, i would like to know a bit more explinations if I were new to PHP and looking into this for the first time.

Josh~