- - - - -
index.php
PHP Code:
echo "<form action=\"confirm.php\" method=\"post\"><br/>";
echo "<br/><textarea id=\"inputText\" name=\"message\"></textarea><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"Broadcast\"/></form>";
confirm.php
PHP Code:
$msg = $_POST["message"];
$sql = mysql_query("SELECT id FROM ibwf_users");
while ($id = mysql_fetch_array($sql))
{
mysql_query("INSERT INTO ibwf_private SET byuid = '1', touid = '".$id[0]."', text = '".$msg."', timesent = '".time()."'");
}
if($sql)
{
echo "Message Sent to All Users!<br/>";
}
else
{
echo "Error!";
}
Ok, so this is used in lava. Follow the procedure and change the variables to yours (add $sid etc)!
If it's helped you, please, click "thanks".
And ask me for more!
Leave a comment: