Correct WML

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • wap2k
    replied
    Your form in full working order use $_POST["pmtou1"] and $_POST["who"] to retrieve the fields it will work . The $_REQUEST also has access to cookies.

    PHP Code:
    else if($action=="toall")
    {
    addonline(getuid_sid($sid),"Owner Tools","");
    echo "<card id=\"main\" title=\"Owner Tools\">";
    echo "<p align=\"center\">";
    echo "<b>Owner Tools</b>";
    echo "</p><p>";
    echo "Message: <input name=\"pmtou1\" maxlength=\"250\"/><br/>";
    echo "Recipient:"; 
    echo "<select name=\"who\" multiple=\"false\">";
    echo "<option value=\"online\">Online Members Only</option>";
    echo "</select><br/>";
    echo "</p><p align=\"center\">";
    echo "<anchor>Update";
    echo "<go href=\"ownrproc.php?action=prvtall2&amp;sid=$sid\" method=\"post\">";
    echo "<postfield name=\"pmtou1\" value=\"$(pmtou1)\"/>";
    echo "<postfield name=\"who\" value=\"$(who)\"/>";
    echo "</go></anchor><br/>";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">Main Menu</a>";
    echo "</p>";
    echo "</card>";
    } 
    
    Last edited by wap2k; 19.01.10, 18:42.

    Leave a comment:


  • GumSlone
    replied
    Originally posted by WereWolveZ View Post
    yep so i add this
    --
    $who = mysql_real_escape_string($_POST["who"] );
    $pmtou1 = mysql_real_escape_string($_POST["pmtou1"] );

    i think "request" is in xhtml
    no its not xhtml, you can do this with request:

    PHP Code:
    $who = mysql_real_escape_string($_REQUEST["who"] ); 
    $pmtou1 = mysql_real_escape_string($_REQUEST["pmtou1"] ); 
    

    Leave a comment:


  • WereWolveZ
    replied
    yep so i add this
    --
    $who = mysql_real_escape_string($_POST["who"] );
    $pmtou1 = mysql_real_escape_string($_POST["pmtou1"] );

    i think "request" is in xhtml
    Last edited by WereWolveZ; 18.01.10, 15:16.

    Leave a comment:


  • GumSlone
    replied
    Originally posted by thanatos View Post
    I see u use REQUEST but ur go href method is POST. i think REQUEST is different from POST ;-)
    yes its different it includes both POST and GET values

    Leave a comment:


  • thanatos
    replied
    I see u use REQUEST but ur go href method is POST. i think REQUEST is different from POST ;-)

    Leave a comment:


  • WereWolveZ
    replied
    PHP Code:
    else if($action=="prvtall2")
    
    {
     echo "<card id=\"main\" title=\"Owner Tools\">";
    echo "<p align=\"center\">";
    
         echo "</p>";
    
    $who = mysql_real_escape_string($_POST["who"] );
    $pmtou1 = mysql_real_escape_string($_POST["pmtou1"] );
    $who = mysql_real_escape_string($_GET["who"] );///if not working try to delete this mate
    $byuid = getuid_sid($sid);
    
    
    $tm = microtime(get_as_float);
    
    if($who=="online")
    {
    $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
    echo "<p>";
    echo "<img src=\"../images/check.png\" alt=\"x\"/>";
    echo "The Online Members have been sent This Message<br/>";
    echo "<a href=\"ownercp.php?action=ownercp&amp;sid=$sid\">»Owner Tools</a>";
    
    $pms = mysql_query("SELECT userid FROM ibwf_online ");
    $tm = microtime(get_as_float);
    while($pm=mysql_fetch_array($pms))
    {
    mysql_query("INSERT INTO ibwf_private SET text='Public Anouncment:[br/]".$pmtou1."[br/][i]This message was sent to all online members[/i]', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'");
    
    }
    echo "</p>";
     echo "</card>";
    }
    
    } 
    
    here you GO mate


    PHP Code:
    //////////////////////////PM 2 ALL 
    else if($action=="toall") 
    { 
    addonline(getuid_sid($sid),"Owner Tools",""); 
      echo "<card id=\"main\" title=\"Owner Tools\">"; 
      echo "<p align=\"center\">"; 
      echo "<b>Owner Tools</b>"; 
      echo "</p>"; 
      echo "message: <input name=\"pmtou1\" maxlength=\"60\"/><br/>";
       
    echo "pm to:<br/><select name=\"who\">";
    echo "<option value=\"online\">to members</option>";
      /////echo "<option value=\"2\">to staffs</option>";///////u can add this if u want to add some options to send
     
    echo "</select><br/>";
        echo "<anchor>SUBMIT";
    echo "<go href=\"ownrproc.php?action=prvtall2&amp;sid=$sid\" method=\"post\">";
             echo "<postfield name=\"pmtou1\" value=\"$(pmtou1)\"/>";
    echo "<postfield name=\"who\" value=\"$(who)\"/>";
    echo "</go></anchor><br/>-----<br/>";
    
    echo "<p>"; 
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">»Main Menu</a>"; 
    echo "</p></card>"; 
       
    
    } 
    
    BTW mate u can use this in xhtml

    Code:
    $who = mysql_real_escape_string($_REQUEST["who"] ); 
    $pmtou1 = mysql_real_escape_string($_REQUEST["pmtou1"] );
    Last edited by WereWolveZ; 18.01.10, 15:13.

    Leave a comment:


  • Vayne
    replied
    post
    PHP Code:
    echo mysql_error(); 
    
    to see more...

    Leave a comment:


  • bOrN2pwn
    replied
    Thanx WereWolveZ but it dosnt post the message it's blank in the inbox..... What gives.......

    Leave a comment:


  • WereWolveZ
    replied
    Code:
    echo "message: <input name=\"pmtoul\" maxlength=\"60\"/><br/>";
       
    echo "select **** haha:<br/><select name=\"who\">";
    echo "<option value=\"online\">to members</option>";
      /////echo "<option value=\"2\">to staffs</option>";///////u can add this if u want to add some options to send
     
    echo "</select><br/>";
        echo "<anchor>SUBMIT";
    echo "<go href=\"ownrproc.php?action=prvtall2&amp;sid=$sid\" method=\"post\">";
             echo "<postfield name=\"pmtoul\" value=\"$(pmtoul)\"/>";
    echo "<postfield name=\"who\" value=\"$(who)\"/>";
    echo "</go></anchor><br/>-----<br/>";

    just edit this man i made it for you....
    Last edited by WereWolveZ; 17.01.10, 13:58.

    Leave a comment:


  • bOrN2pwn
    replied
    I still cant get this working...... Will some 1 please look into this for me.....

    Thanx...

    Leave a comment:


  • thanatos
    replied
    Mate im not using PC and ur giving me a headache. i'll go now.. someone else will help u..

    Leave a comment:


  • bOrN2pwn
    replied
    Here's the snippet I see no error....

    PHP Code:
    else if($action=="prvtall2")
    
    {
     echo "<card id=\"main\" title=\"Owner Tools\">";
    echo "<p align=\"center\">";
    
         echo "</p>";
    $who = mysql_real_escape_string( $_REQUEST["who"] );
    $pmtou1 = mysql_real_escape_string( $_REQUEST["pmtou1"] );
    $byuid = getuid_sid($sid);
    
    
    
    $tm = microtime(get_as_float);
    
    if($who=="online")
    {
    $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
    echo "<p>";
    echo "<img src=\"../images/check.png\" alt=\"x\"/>";
    echo "The Online Members have been sent This Message<br/>";
    echo "<a href=\"ownercp.php?action=ownercp&amp;sid=$sid\">»Owner Tools</a>";
    
    $pms = mysql_query("SELECT userid FROM ibwf_online ");
    $tm = microtime(get_as_float);
    while($pm=mysql_fetch_array($pms))
    {
    mysql_query("INSERT INTO ibwf_private SET text='Public Anouncment:[br/]".$pmtou1."[br/][i]This message was sent to all online members[/i]', byuid='".$byuid."', touid='".$pm[0]."', timesent='".$tm."'");
    
    }
    echo "</p>";
     echo "</card>";
    }
    
    } 
    

    Leave a comment:


  • thanatos
    replied
    See u made it
    Code:
     echo "</p">;
    the right way is this..
    Code:
    echo "</p>";
    ur really not observing

    Leave a comment:


  • bOrN2pwn
    replied
    It is
    Code:
    echo "</p">;

    Leave a comment:


  • thanatos
    replied
    Here's my advice.. read on tutorials about basic WML and basic PHP & MySQL so u cn go further in coding.. :-)

    Leave a comment:

Working...
X