If I want to stamp a table entry by when the insert query was performed, i can use an SQL statement to pass STRING data to the table such as this, correct?:
[FONT=Courier New]insert into mytable values ('', '$POST[text_field1]', '$POST[time_as_string]', '$_POST[date_as_string]')[/FONT]
but, i think i would want to automatically "stamp" these entries, so that the data is most accurate according to system time, and of course there is NO room for human error?
i've been working at this on my own, looking at DATETIME, DATE, and TIME in the MySQL Manual and mkTime in the PHP Manual, and even made a test db and test php form w/ "echoed" html form for the string input.
my problem is that i can't think of any other way to go about it.
obvioulsy i can place entries w/ my SQL above, but those strings are at the mercy of the user-- they could be faked, and i just know it's not the right way to do it.
please help. i'm just looking for the proper syntax for getting, preferably this format of date mm-dd-yyyy, but this is fine (yyyy-mm-dd), and the time i'd like to show (HH:ii)
i don't really need to process the info-- it is really for display and singular reference purposes only-- meaning if a person viewing these results wishes to know when those entries were made, the info is available. no time-span calculations need to be made, necessarily.
once i figure out how to do that part-- then i need to figure out how to automatically generate a "Date Modified" field.
I also need two more fields showing DATE and TIME data, although sharing a primary key ID w/ "Date Added" and "Date Modified", but the data itself is globally unrelated-- what i'm trying to say is that, aside from "Date Modified" being related to "Date Added", the "Date Added" and "Date Modified" are unrelated to the other DATE and TIME field in that row of the database.
thank you!!