Jennifer Gardner wrote:
Hello,
I am looking for a good tutorial for having the date submitted when a form
is submitted and then being able to display the date in a results
 table/page. Basically, when the form is submitted I want the datesubmitted
 into the mysql table and then I want to display that on a results page.
 Thank you in advance for your help.
Jennifer
------------------
That should be pretty simple, when you INSERT your data into mysql, add 
NOW() to insert the current time stamp.
HYPERLINK
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_now>>Retrieving
 is just as easy with dateformat 
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format>>Let
 me know if you need help and I will post example MySQL queries.
John
---------------------

Please remember to write your response BELOW the previous text. 
----------------------
Hi John,
I have looked at the info supplied by your links and am still struggling.
So, if the offer still stands I would love to check out the examples and see
if that helps. I understand (to a degree) how to get the date via php but I
just do not understand how to submit it to the database. The site I am
trying to do it for is - http://www.ihaveplayeddiscgolf.com/
Currently the user via the form submits the date. This is causing confusion
for signers and so I want the date to automatically be entered and displayed
on the results page the same way it is currently displayed.
Thanks again for your assistance,
Jennifer
-------------------
Hi Jennifer, 
 
Using the (current_date) can save the date/time automatically. Look at the 
example below to see how it works (assuming that you are using PHP as server 
side scripting):
 
Examle:------------------------------------------------
$sql = "INSERT INTO users (username, password, email, location, 
date_registered) VALUES ('$username', '$password', '$email', '$location', 
current_date)";
-------------------------------------------------------
 
Look at the last value in the VALUES section (current_date), this is not PHP 
function, it's MySQL built-in function, that stores date/time in the 
"date_registered" column.
 
Good Luck.
 
J Mehmett
_________________________________________________________________
The other season of giving begins 6/24/08. Check out the i’m Talkathon.
http://www.imtalkathon.com?source=TXT_EML_WLH_SeasonOfGiving

[Non-text portions of this message have been removed]


------------------------------------

Please remember to write your response BELOW the previous text. 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-listYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php-list/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to