Function sending

Started on the old forum in February 2011 · view the original in the archive · old links redirect here

11 replies · 639 views · started 15 years ago · 1 min read

4 participants
Leviathan73 Senior · 260 posts #1

Hello friends this function does not send the message, you know what is the action?

echo "<form action=\"genproc.php?action=general&sid=$sid\" method=\"post\">";
echo "<br/>Write: <input name=\"fmsg\"  value=\"$fmsg\" maxlength=\"255\" />";
echo "<br/><input type=\"Submit\" Name=\"Submit\" Value=\"submit\"></form>";
if($action=="general")
{
$fmsg = $_POST["fmsg"];echo "<head>";
  echo "<title>Oggetto Chat</title>";
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
  echo "</head>";
  echo "<body>";
  echo "<p align=\"center\">";   $res = mysql_query("UPDATE ibwf_settingss SET value='".$fmsg."' WHERE name='4ummsg'");
  if($res)
  {
  echo "<img src=\"../images/ok.gif\" alt=\"O\"/>successfully written<br/>";
  }else{
  echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error write<br/>";
  }
 echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
  echo "</body>";
}
Leviathan73 Senior · 260 posts #3

yes, and I want to put in the chat room, but does not write the message, the database will receive the message, but does not write in room. I need to put here

/////////////////////////////////////////////////////CHAT OPTIONS
        else if ($action=="options")   
                        {
   echo "<head>";
      echo "<title>Chat Option</title>";
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
          $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
        addonline($uid," Chat Option ($mmsg)","");
        echo "<form action=\"genproc.php?action=say&sid=$sid\" method=\"post\">";
echo "<br/>Oggetto: <input name=\"fmsg\"  value=\"$fmsg\" maxlength=\"255\" />";
echo "<br/><input type=\"Submit\" Name=\"Submit\" Value=\"submit\"></form>";
Leviathan73 Senior · 260 posts #5

In not sending me to send the message, because there is a window and is not clickable. the text should be here

$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
        addonline($uid,"Chat $rname ($mmsg)","chat.php?rid=$rid&rpw=$rpw");
        //echo "<p>";
        echo popup($sid);
echo "<img src=\"../images/logo2.gif\" alt=\"*\"/><br/>";
$fmsg = getbbcode(getfmsg(), $sid, 0);
  echo "<p align=\"left\">$fmsg</p>";
 
       echo "<b>1 </b><a name=\"top\" id=\"top\" accesskey=\"1\" href=\"chat.php?action=say&sid=$sid&rid=$rid&rpw=$rpw\">write</a><br/>";
something else Fellow · 2,296 posts #6

if its in the database then your form is correct.... so you need to show us this function: getfmsg() which must call it from the database

Leviathan73 Senior · 260 posts #7

function put the code here in this

$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
        addonline($uid,"Chat $rname ($mmsg)","chat.php?rid=$rid&rpw=$rpw");
        //echo "<p>";
        echo popup($sid);
echo "<img src=\"../images/logo2.gif\" alt=\"*\"/><br/>";
$fmsg = getbbcode(getfmsg(), $sid, 0);
  echo "<p align=\"left\">$fmsg</p>";
 
       echo "<b>1 </b><a name=\"top\" id=\"top\" accesskey=\"1\" href=\"chat.php?action=say&sid=$sid&rid=$rid&rpw=$rpw\">write</a><br/>";
something else Fellow · 2,296 posts #8
$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
        addonline($uid,"Chat $rname ($mmsg)","chat.php?rid=$rid&rpw=$rpw");
        //echo "<p>";
        echo popup($sid);
echo "<img src=\"../images/logo2.gif\" alt=\"*\"/><br/>";
$str = mysql_query("SELECT value FROM ibwf_settingss WHERE name='4ummsg'"); //does settingss have 2 "ss" ??
$fmsg = getbbcode($str[0], $sid, 0);
  echo "<p align=\"left\">$fmsg</p>";
 
       echo "<b>1 </b><a name=\"top\" id=\"top\" accesskey=\"1\" href=\"chat.php?action=say&sid=$sid&rid=$rid&rpw=$rpw\">write</a><br/>";
Leviathan73 Senior · 260 posts #9

now I say... I do not know how did you get into here, But there's nothing to show

Added after 6 minutes:

yes, I renamed the table for the message "settingss"

Leviathan73 Senior · 260 posts #11

that action is already hold

$action=$_GET["action"];
$id=$_GET["id"];
$sid = $_GET["sid"];
$rid=$_GET["rid"];
$rpw=$_GET["rpw"];
$uid = getuid_sid($sid);
$uexist = isuser($uid);
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));

In my opinion the problem does not write the message here

if($action=="general")
{
$fmsg = $_POST["fmsg"];echo "<head>";
Leviathan73 Senior · 260 posts #12

lol, somethingelse many thanks it works 🙂. The text message goes to all the rooms .. to make it go in one room, I must add that line in the rooms of the database table? 🙂

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close