Jump to content

Newbie Question About Submit Button


googlit

Recommended Posts

Hi, i am wanting to create a simple page with two buttons on, one that says 'start visit', one that says 'end visit', thats the simple bit, here's what i would like the form to do

 

When 'Start Visit' is clicked i would like it to place an entry in the following db:

 

scsht1.jpg

 

I would like it to add the value "start visit" into the value field, automatically insert todays date into the date field and autonatically insert the time (GMT) into the time field.

 

i have made general form before but have no idea on where to start.......

 

any help would be appreciated

Link to comment
https://forums.phpfreaks.com/topic/270542-newbie-question-about-submit-button/
Share on other sites

Define the time column as

 

time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP

 

This will insert the current date and time automatically when a new record is added.

As this includes the date the separate date field is redundant.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.