turn reg link on and off wapdesire v_2 script

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

    #16
    Originally posted by brand View Post
    can some let me now where i am going wrong on this please i done it once with help but can not get it to work now



    i am trying to get this to work on the wapdesire v2 script
    try to remove the dot at $main.

    Comment


      #17
      Originally posted by atef View Post
      try to remove the dot at $main.
      Code:
      $results = mysql_query("select registration FROM settings");
      $registration = mysql_fetch_array($results);
      if($registration["reg"]==0){
      $main.="&gt; <a href=\"./register.php\">Register Free</a><br/>";
      } else {
      $main.="reg turned off please try later";
      }
      i have tryed this as well and i get a error which i posted the first time i tryed this
      HELP THEM WHO HELPS YOU



      i only work on wapdesire v_2 coding only

      Comment


        #18
        Like this.
        PHP Code:
        $results mysql_fetch_array(mysql_query("SELECT * FROM settings")); 
        Here in $registration["reg"], "reg" is a table name.
        PHP Code:
        if($results["reg"]==0){ 
        <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

        Comment


          #19
          Originally posted by arnage View Post
          Like this.
          PHP Code:
          $results mysql_fetch_array(mysql_query("SELECT * FROM settings")); 
          Here in $registration["reg"], "reg" is a table name.
          PHP Code:
          if($results["reg"]==0){ 
          thanks for helping arnage i have tryed what you have said bit still not working
          HELP THEM WHO HELPS YOU



          i only work on wapdesire v_2 coding only

          Comment


            #20
            You trying to get reg info ? or stop flood ?
            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


              #21
              Code:
              $results = mysql_query("select reg FROM settings");
              $registration = mysql_fetch_array($results);
              if($registration["reg"]==1){
              $main.="&gt; <a href=\"./register.php\">Register Free</a><br/>";
              } else {
              $main.="reg turned off please try later";
              }

              Comment


                #22
                Originally posted by brand View Post
                thanks for helping arnage i have tryed what you have said bit still not working
                But its was just an example, change vaule of $results["reg"] to $results["registration"], thats the table name. I checked now because i don't use those scripts so didn't know.
                Code:
                INSERT INTO `settings` VALUES(6, 'registration', '1');
                1 - allowed, 0 - closed.
                And there is nothing not to work, this way we select array from settings using mysql_fetch_array() to read and use the data:
                PHP Code:
                $results mysql_fetch_array(mysql_query("SELECT * FROM `settings`")); 
                ... and its stored in:
                PHP Code:
                if ($results['registration'] == 0) {//... closed 
                Another way with same result is to read that one cell:
                PHP Code:
                $results mysql_result(mysql_query("SELECT `registration` FROM `settings`"), 0); 
                ... so:
                PHP Code:
                if ($results == 0) {//... closed 
                <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

                Comment


                  #23
                  Originally posted by arnage View Post
                  But its was just an example, change vaule of $results["reg"] to $results["registration"], thats the table name. I checked now because i don't use those scripts so didn't know.
                  Code:
                  INSERT INTO `settings` VALUES(6, 'registration', '1');
                  1 - allowed, 0 - closed.
                  And there is nothing not to work, this way we select array from settings using mysql_fetch_array() to read and use the data:
                  PHP Code:
                  $results mysql_fetch_array(mysql_query("SELECT * FROM `settings`")); 
                  ... and its stored in:
                  PHP Code:
                  if ($results['registration'] == 0) {//... closed 
                  Another way with same result is to read that one cell:
                  PHP Code:
                  $results mysql_result(mysql_query("SELECT `registration` FROM `settings`"), 0); 
                  ... so:
                  PHP Code:
                  if ($results == 0) {//... closed 

                  thanks for ya help but i got it now thanks very much
                  HELP THEM WHO HELPS YOU



                  i only work on wapdesire v_2 coding only

                  Comment


                    #24
                    Bravo drug :P...
                    title = Welcome to Smarty!
                    cutoff_size = 40

                    [setup]
                    bold = true

                    Comment


                      #25
                      Thank you all who contributed to friends

                      Comment

                      Working...
                      X