Results 1 to 3 of 3

Thread: [RESOLVED] Legit SQL Code?

  1. #1

    Thread Starter
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Resolved [RESOLVED] Legit SQL Code?

    does this sql query look like it should work?
    PHP Code:
    UPDATE `membersSET personal_question_answer='".$_POST['ps_answer']."' AND personal_question='".$_POST['personal_question']."' WHERE member_id LIKE '".$_SESSION['member_id']."' 
    Everything is set correctly. When i go into PHPMyAdmin and do that code manualy, it still does not work. any help?
    My usual boring signature: Something

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: [RESOLVED] Legit SQL Code?

    AND needs to be replaced with a comma (",")
    VB Code:
    1. UPDATE `members` SET personal_question_answer='".$_POST['ps_answer']."', personal_question='".$_POST['personal_question']."' WHERE member_id LIKE '".$_SESSION['member_id']."'
    Like Archer? Check out some Sterling Archer quotes.

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: [RESOLVED] Legit SQL Code?

    And this code is of course subject to SQL injection if magic quotes are disabled.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width