Ownercp - User Update

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

    Ownercp - User Update

    Hi,i create in ownercp an option to update user information from ibwf_xinfo but dont work,can anybody give me some ideas or help coding?It something like this:
    -----
    ownercp.php
    -----
    else if($action=="user_xinfo")
    {
    if($mime== WEB)
    {
    echo webhead($uthm,$stitle);
    $goodhabits= mysql_fetch_array(mysql_query("SELECT goodhabitsFROM ibwf_xinfo WHERE id='".$who."'"));
    $badhabits = mysql_fetch_array(mysql_query("SELECT badhabits FROM ibwf_xinfo WHERE id='".$who."'"));
    echo "<form action=\"ownerproc.php?action=uprof&amp;ses=$ses&a mp;who=$who\" method=\"post\">";
    echo "Goodhabits: <input name=\"ghabits\" maxlength=\"15\" value=\"$goodhabits[0]\"/>
    ";
    echo "Badhabits: <input name=\"bhabits\" maxlength=\"100\" value=\"$badhabits[0]\"/>
    ";
    echo "<input type=\"submit\" value=\"Update\"/>";
    echo "</form>";
    echo webfoot();
    }else{
    echo waphead($stitle);
    etc etc etc etc.....
    echo wapfoot();
    }
    }
    -----
    ownerproc.php
    -----
    bla bla bla the update thing
    www.inbuzunar.mobi - Your mobile portal pocket

    #2
    damn&#39;it nobody knows how to update ibwf_xinfo users profiles in ownercp,just create an example that it work god damn it.
    www.inbuzunar.mobi - Your mobile portal pocket

    Comment


      #3
      Hi,i create in ownercp an option to update user information from ibwf_xinfo but dont work,can anybody give me some ideas or help coding?It something like this:
      -----
      ownercp.php
      -----
      else if($action=="user_xinfo")
      {
      if($mime== WEB)
      {
      echo webhead($uthm,$stitle);
      $goodhabits= mysql_fetch_array(mysql_query("SELECT goodhabitsFROM ibwf_xinfo WHERE id=&#39;".$who."&#39;"));
      $badhabits = mysql_fetch_array(mysql_query("SELECT badhabits FROM ibwf_xinfo WHERE id=&#39;".$who."&#39;"));
      echo "<form action=\"ownerproc.php?action=uprof&amp;ses=$ses&a mp;who=$who\" method=\"post\">";
      echo "Goodhabits: <input name=\"ghabits\" maxlength=\"15\" value=\"$goodhabits[0]\"/>
      ";
      echo "Badhabits: <input name=\"bhabits\" maxlength=\"100\" value=\"$badhabits[0]\"/>
      ";
      echo "<input type=\"submit\" value=\"Update\"/>";
      echo "</form>";
      echo webfoot();
      }else{
      echo waphead($stitle);
      etc etc etc etc.....
      echo wapfoot();
      }
      }
      -----
      ownerproc.php
      -----
      bla bla bla the update thing[/b]
      parca era uid in tabel xinfo nu id;)

      Comment


        #4
        parca era uid in tabel xinfo nu id;)[/b]
        lol ai vazut bine e uid ;) eu am facut un demo dar nu imi iese deloc cred ca de asta nu a creat nimeni pina acum editarea profilului in tabelul xinfo pt administratie.
        www.inbuzunar.mobi - Your mobile portal pocket

        Comment


          #5
          use UPDATE ibwf_xinfo in ownerproc.php?action=uprof

          Comment


            #6
            use UPDATE ibwf_xinfo in ownerproc.php?action=uprof[/b]
            i try any combinations i&#39;ve come in my mind but no result..it update but not in mysql only in file...
            www.inbuzunar.mobi - Your mobile portal pocket

            Comment


              #7
              use it
              Code:
              else if($action=="user_xinfo")
              {
              if($mime== WEB)
              {
              echo webhead($uthm,$stitle);
              $goodhabits= mysql_fetch_array(mysql_query("SELECT goodhabits FROM ibwf_xinfo WHERE id=&#39;".$who."&#39;"));
              $badhabits = mysql_fetch_array(mysql_query("SELECT badhabits FROM ibwf_xinfo WHERE id=&#39;".$who."&#39;"));
              echo "<form action=\"ownerproc.php?action=uprof&amp;ses=$ses&amp;who=$who\" method=\"post\">";
              echo "Goodhabits: <input type=\"hidden\" name=\"ghabits\" value=\"$goodhabits[0]\"/>
              ";
              echo "Badhabits: <input type=\"hidden\" name=\"bhabits\" value=\"$badhabits[0]\"/>
              ";
              echo "<input type=\"submit\" value=\"Update\"/>";
              echo "</form>";
              echo webfoot();
              }else{
              echo waphead($stitle);
              etc etc etc etc.....
              echo wapfoot();
              } 
              }
              else if($action=="uprof")
              Code:
               mysql_query("UPDATE ibwf_xinfo SET goodhabits = &#39;".$_POST["ghabits"]."&#39;, badhabits =&#39;".$_POST["bhabits"]."&#39; WHERE id=&#39;".$_GET["who"]."&#39;");
              be sure your $who,goodhabits,badhabits fields r not empty

              Comment

              Working...
              X