Enable And Disable Profile

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

    #16
    Originally posted by wapmetal View Post
    pablo ur so n0ob! Its easy to code. . ! Do it with ur self!
    also...

    wtf? if u knw so why didnt u helped him? why post such YEAH ITS EASY I KNOW U MAKE BLAH BLAH?
    it would b better without ur post
    sigpiceeeeerrr....

    Comment


      #17
      PHP Code:
      print "<form action=\"profileup.php\" method=\"post\">
      <b>Show Profile?<b> <br />
      <select name=\"view\">
      <option value=\"1\">Yes</option>
      <option value=\"0\">No</option>
      </select><br />
      <input type=\"submit\" name=\"submit\" value=\"Set\">
      </form>"

      PHP Code:
      $view $_REQUEST['view'];
      $set mysql_query("UPDATE drwap_members SET showpr='$view' WHERE ID='$_SESSION[member_ID]'");
      if (!
      $set)
      {
      print 
      "Database Error <br />";
      }
      else
      {
      print 
      "Your Profile has been updated <br />";

      To put it together
      PHP Code:
      $view $_REQUEST['view'];
      $profile mysql_fetch_array(mysql_query("SELECT showpr FROM drwap_members WHERE ID='$view'));
      $profile = $profile[0];
      if (
      $profile==1)
      {
      print "
      Your Profile Code goes here <br />";
      }
      else
      {
      print "
      This Profile is unavailable to you <br />";

      Thats how i do it to enable and disable think even a noob understands it
      Last edited by djdevil89; 07.05.09, 11:48. Reason: Completed Code

      PHP Code:
      foreach ($_SERVER as $server => $value)
      {
      echo 
      "$server is $value<br />";

      Comment


        #18
        thanx all who help rider the code u gave me is not working next yute that said he told me 2 do sumting if i didnt do it and its working u think i wud still b askin

        Comment


          #19
          Originally posted by alesh View Post
          oh fak i cant c him cryin anymore lol

          make another row in ur users table
          PHP Code:
          `viewproint(1NOT NULL default '0'
          then go 2 profil file and add
          PHP Code:
          $wtf mysql_fetch_array(mysql_query("SELECT viewpro FROM USER_TABLE WHERE id='".$who."'"));
          if(
          $wtf[0]=="1")
          {
          echo 
          "<div>";
          echo 
          "profil closed by user!";
          echo 
          "</div>"
          exit();

          then also make a page where user can enable/disable his profil 2 b public or closed or etc i dnt care.....stop whining and try somthing by urself....
          i gave somthing u can start and also riderz gave u...
          u can make what i showed u, or riderz or u can put tht 2 ****s 2gether lol

          yes one is working fine ! you can use this script

          Comment


            #20
            there not working bros

            Comment


              #21
              in your users table create a field, something like active_profile, it can be a tinyint(1) and where only gonna store int flags in there representing 1 or 0

              now in your users control panel where they edit their stuff you need to add a part for them to enable/disable profile. if they choose to enabled profile then you set the "active_profile" field or whatever u wanna call it to 1, otherwise you set it to 0 to disable it

              now all you need to do is go to the script that shows the profile (profile.php for arguments sake). and in there under the query that selects all the users info for display you just put

              Code:
              if($user['active_profile'] == 1)
               {
               //normal page
               }
              else
               echo "This user has hidden their profile";
              very basic way of doing it and doesnt account for allowing buddies to view and staff to view, but its the basics and you should be able to make ur own from their if you can program basic php and understand ur site script to a basic/intermediate level

              i aint providing copy and paste code so dont ask

              Comment


                #22
                what script r u using ???

                USER_TABLE THE USER DATA STORED IN THE SLQ -
                make a new row :
                `
                viewpro` int(1) NOT NULL default '0',


                then put this in your profile page -

                $wtf = mysql_fetch_array(mysql_query("SELECT viewpro FROM USER_TABLE WHERE id='".$who."'"));
                if(
                $wtf[0]=="1")
                {
                echo "Profile is Disabled by the user<br/>";
                }
                else
                if($wtf[0]=="0")
                {

                [YOUR PROFILE CODE]

                }

                i checked this code and working fine if you still have problem tell me !

                Comment


                  #23
                  ok bro am gonna do that

                  Comment

                  Working...
                  X