Need help: Store date in sql database, then echo using php

Discussion in 'Databases' started by bigpapa, Dec 5, 2008.

  1. #1
    I currently have a simple textarea and submit button whose contents are saved to a row in an sql database.

    I need help trying to create a row to store the date the textarea contents were updated, then echo the date.

    Seems simple enough... could someone help me out?

    Thanks
     
    bigpapa, Dec 5, 2008 IP
  2. CreativeClans

    CreativeClans Peon

    Messages:
    128
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You'll have to add a date field to your database (if it doesn't exist yet), and modify your INSERT query.
    Something like:
    
    INSERT INTO tablename
    VALUES ('$text', CURDATE())
    
    Code (markup):
     
    CreativeClans, Dec 5, 2008 IP