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

Undefined index: username HELP NEWBIE
I am trying a simple login/logout for my website. It works well with checking if the username exists

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

Simple AND question
Hello,

I've got following code:

Code: if(strpos($row[13],"http://")

how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt ?
how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt and so on 200-300 into file 3.txt ?

Adding meta tags under Zend FW
Hello there, recently has come to my hands the FTP of a website which is running under Zend, I would

Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where a

Shopping Cart
Can anyone direct me to a Simple, Basic structure of a shopping cart.
New to classes. I want to s

sapgui f4 help last search
I know this has to be simople. One user (maybe more) does not have the "last search saved" from the

Passing vars to the DB
I have 3 small testing tables:

ID TYPE
1 pepperoni
2 C. bacon
3 taco

ID TY

login form can you find my error?
registrationform.php seems fine send data to registration.php
registration.php seems fine checks

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