Date/Time and Checkbox


Posted on 16th Feb 2014 07:03 pm by admin

Hi Everyone,

I am trying to figure out how to insert the current date and time into the database.
Scenario:
Did you know?Explore Trending and Topic pages for more stories like this.
1) user enter my site and fills up the forum
2) hits the submit button
3) Regardless of the user location I want the time to be stored in the database in PST.

Question:

Do I need to get an input from the user for time? or can I just use some server time etc?

Right now I'm asking them to manually insert the date and time in the textbox which is not that effective


Also I have a checkbox in my forums but I always get 0 in the value field when I check the database. I have it setup as (tinyint(1)) in the database using mysql. I think I am doing wrong.


Is there a way to require the user to check the button before they hit the "Submit" button?

Thank you in advance
No comments posted yet

Your Answer:

Login to answer
248 Like 43 Dislike
Previous forums Next forums
Other forums

Help with form post data and arrays
Hi all,

I am new to this forum... It has been awhile since i have worked with arrays, and i a

Port scanner problem
Hai
recently i developed one app through which u can check the opened and closed ports under an

Can't find a decent web analytics!!!
I've downloaded and installed Piwik. It's location detection based on IP addresses is fairly inaccur

Restricted access to sub-folder in iis6 doesn't work?
Basically I'm trying to add restriction to sub-folder (which contains pdf) in web.config for iis6 as

server trace logs
could any one tell me from where do i get error logs in xMII??I want to check the reason for dtabase

php/xmlrpc class issue
I am working on xml-rpc in php to start with.

I have a class that only has variables defined

Adding to the next element in a multidimensional array
Hi, I'm trying to add a value to $node->field_spaces['nid'] where x is the next available spo

Creating a unique 'control panel' for each user
Hi there,

I'm thinking of designing a site that will allow users to sign up and have their ow

unserialize help, getting errors
hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is

Can't seem to capture a variable in a chained select
I'm *this* close to having a chained select running but for some reason it doesn't seem to be pickin

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash