SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2001
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Inserting and recalling data from a HTML form into a MySQL database

    Hi guys,

    Basically i have a system where users signup for my website and there user name is created (and is unique) in a row, in a table. However, I also have a quiz on the site which gives an output score value. My question is, how can I insert that score into a field which is on the same row as the username?

    And then how do I recall that data into a HTML form?

    all i have seen so far from MySQL is how to insert a new row but never have I seen modification of the value of a field. Perhaps there is another method apart from INSERT, I have seen a thing called UPDATE, maybe that is it, i dont know, that is why i am asking

  2. #2
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    UPDATE users SET score = '20' WHERE userid = '4'

    It works kinda like that.


Bookmarks

Posting Permissions

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