Pls make this code

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

    Pls make this code

    Pls this code is for point transfer from publisher to advertise but this code unable to transfer correct this pls.
    PHP Code:
    <?php
    $getu 
    mysql_query("SELECT * FROM users WHERE user='$user'");
    $getu1 mysql_fetch_array($getu); 
    $id $getu1['id'];
    $bal $getu1['bal'];
    $pnt $getu1['point'];


    $getu mysql_query("SELECT * FROM comp WHERE id='$id'");
    $getu1 mysql_fetch_array($getu); 
    $id $getu1['id'];
    $point $getu1['point'];

    $ua mysql_query("UPDATE comp SET point=(point+$pnt) WHERE id='$id'");
                
    $up mysql_query("UPDATE users SET points=(pnt-$point) WHERE id='$id'");
    ?> 
    <div class='cons1'>
    <form action='transfer.php' method='post'>
    <b>Amount:</b><br/><input type='text' name='point' id='point' value='10'/><br/>
    <div align='right'><input type='submit' name='Pub2Adv' id='Pub2Adv' value='Transfer'/></div>
    </form></div>
    Last edited by metulj; 19.08.12, 10:21.

    #2
    u missing $ sign [ $point+$pnt , $pnt-$point]... is this typo ??

    Comment


      #3
      Originally posted by RTS View Post
      u missing $ sign [ $point+$pnt , $pnt-$point]... is this typo ??
      its not typo. Those are mysql table field names.
      PHP Code:
      $("#mfreak").find(".head brain").clone(); 
      Progress:
      Code:
      [|||___________________________] : 5%
      Output:
      Code:
      Memory limit reached, unable to complete operation.
      Support answer:
      Code:
      Try using a super uber strong mega computer to reach at least 10%.

      Comment


        #4
        Originally posted by RTS View Post
        u missing $ sign [ $point+$pnt , $pnt-$point]... is this typo ??
        point=point+$pnt //

        Comment


          #5
          Originally posted by Gauravraj View Post
          Pls this code is for point transfer from publisher to advertise but this code unable to transfer correct this pls.
          PHP Code:
          <?php
          $getu 
          mysql_query("SELECT * FROM users WHERE user='$user'");
          $getu1 mysql_fetch_array($getu); 
          $id $getu1['id'];
          $bal $getu1['bal'];
          $pnt $getu1['point'];


          $getu mysql_query("SELECT * FROM comp WHERE id='$id'");
          $getu1 mysql_fetch_array($getu); 
          $id $getu1['id'];
          $point $getu1['point'];

          $ua mysql_query("UPDATE comp SET point=(point+$pnt) WHERE id='$id'");
                      
          $up mysql_query("UPDATE users SET points=(pnt-$point) WHERE id='$id'");
          ?> 
          <div class='cons1'>
          <form action='transfer.php' method='post'>
          <b>Amount:</b><br/><input type='text' name='point' id='point' value='10'/><br/>
          <div align='right'><input type='submit' name='Pub2Adv' id='Pub2Adv' value='Transfer'/></div>
          </form></div>
          could you post table structure for comp and users table,that second sql. Are you sure that that script dont show an error? It dont make sense. Where do you fetch post data?
          Last edited by mFreak; 19.08.12, 10:33. Reason: im blind :/
          PHP Code:
          $("#mfreak").find(".head brain").clone(); 
          Progress:
          Code:
          [|||___________________________] : 5%
          Output:
          Code:
          Memory limit reached, unable to complete operation.
          Support answer:
          Code:
          Try using a super uber strong mega computer to reach at least 10%.

          Comment


            #6
            This is ad4earn sql file but in this sql there is no structure for points in comp maybe i have manually created in comp pls help.
            Code:
            -- Table structure for table `comp`
            --
            
            CREATE TABLE IF NOT EXISTS `comp` (
              `id` int(100) NOT NULL auto_increment,
              `title` varchar(50) NOT NULL,
              `uid` int(50) NOT NULL,
              `url` varchar(50) NOT NULL,
              `type` int(1) NOT NULL,
              `adult` int(1) NOT NULL default '0',
              `img` varchar(200) NOT NULL,
              `cat` text NOT NULL,
              `lang` tinytext NOT NULL,
              `intr1` tinytext NOT NULL,
              `intr2` tinytext NOT NULL,
              `intr3` tinytext NOT NULL,
              `intr4` tinytext NOT NULL,
              `intr5` tinytext NOT NULL,
              `st` int(1) NOT NULL default '0',
              `ckey` varchar(250) NOT NULL default '0',
              PRIMARY KEY  (`id`)
            ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
            Last edited by arnage; 22.08.12, 19:24.

            Comment


              #7
              im confused do you just want points on the comp table?



              Code:
              -- Table structure for table `comp`
              --
              
              CREATE TABLE IF NOT EXISTS `comp` (
              `id` int(100) NOT NULL auto_increment,
              `title` varchar(50) NOT NULL,
              `uid` int(50) NOT NULL,
              `url` varchar(50) NOT NULL,
              `type` int(1) NOT NULL,
              `point` varchar(50) NOT NULL default '0',
              `adult` int(1) NOT NULL default '0',
              `img` varchar(200) NOT NULL,
              `cat` text NOT NULL,
              `lang` tinytext NOT NULL,
              `intr1` tinytext NOT NULL,
              `intr2` tinytext NOT NULL,
              `intr3` tinytext NOT NULL,
              `intr4` tinytext NOT NULL,
              `intr5` tinytext NOT NULL,
              `st` int(1) NOT NULL default '0',
              `ckey` varchar(250) NOT NULL default '0',
              PRIMARY KEY (`id`)
              ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

              that should work
              Last edited by Guest; 22.08.12, 15:50.

              Comment


                #8
                Originally posted by leigh17 View Post
                im confused do you just want points on the comp table?



                Code:
                -- Table structure for table `comp`
                --
                
                CREATE TABLE IF NOT EXISTS `comp` (
                `id` int(100) NOT NULL auto_increment,
                `title` varchar(50) NOT NULL,
                `uid` int(50) NOT NULL,
                `url` varchar(50) NOT NULL,
                `type` int(1) NOT NULL,
                `point` varchar(50) NOT NULL default '0',
                `adult` int(1) NOT NULL default '0',
                `img` varchar(200) NOT NULL,
                `cat` text NOT NULL,
                `lang` tinytext NOT NULL,
                `intr1` tinytext NOT NULL,
                `intr2` tinytext NOT NULL,
                `intr3` tinytext NOT NULL,
                `intr4` tinytext NOT NULL,
                `intr5` tinytext NOT NULL,
                `st` int(1) NOT NULL default '0',
                `ckey` varchar(250) NOT NULL default '0',
                PRIMARY KEY (`id`)
                ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

                that should work
                Ya i make it points table but i want points transfer working.

                Comment


                  #9
                  Originally posted by Gauravraj View Post
                  Pls this code is for point transfer from publisher to advertise but this code unable to transfer correct this pls.
                  PHP Code:
                  <?php
                  $getu 
                  mysql_query("SELECT * FROM users WHERE user='$user'");
                  $getu1 mysql_fetch_array($getu); 
                  $id $getu1['id'];
                  $bal $getu1['bal'];
                  $pnt $getu1['point'];


                  $getu mysql_query("SELECT * FROM comp WHERE id='$id'");
                  $getu1 mysql_fetch_array($getu); 
                  $id $getu1['id'];
                  $point $getu1['point'];

                  $ua mysql_query("UPDATE comp SET point=(point+$pnt) WHERE id='$id'");
                              
                  $up mysql_query("UPDATE users SET points=(pnt-$point) WHERE id='$id'");
                  ?> 
                  <div class='cons1'>
                  <form action='transfer.php' method='post'>
                  <b>Amount:</b><br/><input type='text' name='point' id='point' value='10'/><br/>
                  <div align='right'><input type='submit' name='Pub2Adv' id='Pub2Adv' value='Transfer'/></div>
                  </form></div>
                  I was just reading ad4earns sql, and I dont see that 'pnt' column in users table. Maybe you were thinking about 'point'. Try changing that it should solve your problem.
                  Last edited by mFreak; 22.08.12, 19:28.
                  PHP Code:
                  $("#mfreak").find(".head brain").clone(); 
                  Progress:
                  Code:
                  [|||___________________________] : 5%
                  Output:
                  Code:
                  Memory limit reached, unable to complete operation.
                  Support answer:
                  Code:
                  Try using a super uber strong mega computer to reach at least 10%.

                  Comment

                  Working...
                  X