Wapdesire(blog Problem)

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

    Wapdesire(blog Problem)

    the ibwf_blogs table is fine, its got all the required fields, yet I or any member of my site is unable to post any blog. It gives XError Posting Message, why is that so ?
    Plz can som1 help me?? The Table structure is ::::::
    --
    -- Table structure for table `ibwf_blogs`
    --

    CREATE TABLE `ibwf_blogs` (
    `id` int(100) NOT NULL auto_increment,
    `bowner` int(100) NOT NULL default '0',
    `bname` varchar(30) NOT NULL default '',
    `btext` blob NOT NULL,
    `bgdate` int(100) NOT NULL default '0',
    PRIMARY KEY (`id`),
    UNIQUE KEY `bname` (`bname`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

    --
    And the code is
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
    else if($action=="addblg")
    {
    echo "<head>\n";
    echo "<title>Rock-On</title>\n";
    echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$theme[0]\" />";
    echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />\n";
    echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n";
    echo "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n";

    echo "</head>";
    echo "<body>";

    if(!getplusses(getuid_sid($sid))>50)
    {
    echo "<p align=\"center\">";
    echo "Only 50+ plusses can add blogs

    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
    echo "</p>";
    echo "</card>";
    echo "</wml>";
    exit();
    }
    $msgtxt = $_POST["btitle"];
    $msgtxt = $_POST["msgtxt"];
    $qut = $_POST["qut"];
    addonline(getuid_sid($sid),"Adding a blog","");
    echo "<card id=\"main\" title=\"rock-on.mobi\">";
    echo "<p align=\"center\">";
    $crdate = $time;
    $uid = getuid_sid($sid);
    $ress = false;

    if((trim($msgtxt)!="")&&(trim($btitle)!=""))
    {
    $ress = mysql_query("INSERT INTO ibwf_blogs SET bowner=&#39;".$uid."&#39;, bname=&#39;".$btitle."&#39;, bgdate=&#39;".$crdate."&#39;, btext=&#39;".$msgtxt."&#39;");
    }
    if($ress)
    {
    $cow = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
    $cow = $cow[0]+10;
    mysql_query("UPDATE ibwf_users SET plusses=&#39;".$cow."&#39; WHERE id=&#39;".$uid."&#39;");
    echo "<img src=\"images/ok.gif\" alt=\"O\"/>Message Posted Successfully";
    }
    else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Posting Message";
    }

    echo "

    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
    echo "</p>";
    echo "</body>";
    echo "</html>";
    exit();

    }
    </div>
    Attached Files
    tinyurl.com/earnbymobile
    Easy earning for Indians
    ---------------------
    Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
    goo.gl/6vub3

    #2
    when i look at posted code... first idea...
    FFS <card>, <wml>, <body> and <html> in same file ??
    that surely cant do any good
    It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
    ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
    ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
    キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

    Comment


      #3
      yep metulj you are correct, the code was wrong, I corrected it now but still i cant post a blog



      <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
      else if($action=="addblg")
      {
      echo "<head>\n";
      echo "<title>Rock-On</title>\n";
      echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$theme[0]\" />";
      echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />\n";
      echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n";
      echo "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n";

      echo "</head>";
      echo "<body>";

      if(!getplusses(getuid_sid($sid))>50)
      {
      echo "<p align=\"center\">";
      echo "Only 50+ plusses can add blogs

      ";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
      }
      $msgtxt = $_POST["btitle"];
      $msgtxt = $_POST["msgtxt"];
      $qut = $_POST["qut"];
      $crdate = $time;
      $uid = getuid_sid($sid);
      $res = false;

      if((trim($msgtxt)!="")&&(trim($btitle)!=""))
      {
      $res = mysql_query("INSERT INTO ibwf_blogs SET bowner=&#39;".$uid."&#39;, bname=&#39;".$btitle."&#39;, bgdate=&#39;".$crdate."&#39;, btext=&#39;".$msgtxt."&#39;");
      }
      if($res)
      {
      $cow = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
      $cow = $cow[0]+10;
      mysql_query("UPDATE ibwf_users SET plusses=&#39;".$cow."&#39; WHERE id=&#39;".$uid."&#39;");
      echo "<img src=\"images/ok.gif\" alt=\"O\"/>Message Posted Successfully";
      }
      else{
      echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Posting Message";
      }

      echo "

      ";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();

      }</div>
      tinyurl.com/earnbymobile
      Easy earning for Indians
      ---------------------
      Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
      goo.gl/6vub3

      Comment


        #4
        more than likely
        your input name on index.php are not the same as the strings name on genproc.php
        Code:
          $msgtxt = $_POST["btitle"];
        
          $msgtxt = $_POST["msgtxt"];
        
          $qut = $_POST["qut"];

        Comment


          #5
          nope. its the same bro
          btitle and msgtxt the input names match exactly!
          <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action=="addblg")
          {


          if(!getplusses(getuid_sid($sid))>50)
          {
          echo "<head>";
          echo "<title>Add Blog</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
          echo "<body>";
          echo "<p align=\"center\">";
          echo "you should have 50 plusses to add a blog

          ";
          echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
          echo "</p>";
          echo "</body>";
          echo "</html>";
          exit();
          }
          addonline(getuid_sid($sid),"Adding a blog","");

          echo "<head>";
          echo "<title>Add Blog</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
          echo "<body>";

          echo "<p align=\"center\">";
          echo "<form action=\"genproc.php?action=addblg&amp;sid=$sid\" method=\"post\">";
          echo "Title:<input name=\"btitle\" maxlength=\"30\"/>
          ";
          echo "Text:<input name=\"msgtxt\" maxlength=\"500\"/>
          ";
          echo "<input type=\"submit\" value=\"Add Blog\"/>";
          echo "</form>";

          echo "

          0 <a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
          echo "</p>";
          echo "</body>";
          }
          </div>
          tinyurl.com/earnbymobile
          Easy earning for Indians
          ---------------------
          Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
          goo.gl/6vub3

          Comment


            #6
            add this in genproc.php
            Code:
              $btitle = $_POST["btitle"];
              $msgtxt = $_POST["msgtxt"];
            sigpic

            Comment


              #7
              Thanks opticalpigion, problem resolved, single variable having two different values wasnt being accepted in the database.
              Thank you very much
              tinyurl.com/earnbymobile
              Easy earning for Indians
              ---------------------
              Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
              goo.gl/6vub3

              Comment


                #8
                Code:
                   $btitle = $_POST["btitle"];
                   $msgtxt = $_POST["msgtxt"];
                to

                Code:
                $btitle=mysql_real_escape_string($btitle);
                $msgtxt=mysql_real_escape_string($msgtxt);
                Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                Visit: WapMasterz Coming Back Soon!
                _______
                SCRIPTS FOR SALE BY SUBZERO
                Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                _______
                Info & Tips
                php.net
                w3schools.com

                Comment


                  #9
                  Originally posted by opticalpigion View Post
                  add this in genproc.php
                  Code:
                  ��$btitle = $_POST["btitle"];
                  ��$msgtxt = $_POST["msgtxt"];

                  Thank You, This is working................

                  Comment

                  Working...
                  X