Hardcore coding help needed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • who
    So Fucking Banned
    • Aug 2003
    • 19593

    #1

    Hardcore coding help needed

    hi I just need someone to help me with one line of code in wordpress backend.

    I have a new field in the 'wp_user' table of the wordpress database,

    All I need to do is write some one line of code which will update that field with a value from $_POST

    I am struggling now with this crap for a couple of hours... I feel like a retard and most likely am. But can anyone help me out?

    Thanks.
  • who
    So Fucking Banned
    • Aug 2003
    • 19593

    #2
    I should've said '

    Comment

    • who
      So Fucking Banned
      • Aug 2003
      • 19593

      #3
      I should've said 'simple help required'... I bet there's 50 people in here who could do this for me in 20 seconds...

      Comment

      • xenilk
        Confirmed User
        • Jan 2006
        • 921

        #4
        $value = $_POST['value'];
        $query = sprintf("UPDATE wp_user SET field1 = 'whatever goes here' WHERE field2 = '%s'",
        mysql_real_escape_string($value));
        mysql_query($query);

        Query could be changed/adapted to your needs.
        40$/Page PSD->XHTML/CSS Transformations

        Comment

        • who
          So Fucking Banned
          • Aug 2003
          • 19593

          #5
          ^ 10 points that man!!

          Thank you you have solved my problem, I owe you!!

          Comment

          • xenilk
            Confirmed User
            • Jan 2006
            • 921

            #6
            No problem, glad I could help
            40$/Page PSD->XHTML/CSS Transformations

            Comment

            Working...