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:
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

Error Messaging not working
I changed the way my form tells the user of an error. But I can't seem to get it to work properly.

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

Variable passed to each() is not an array or object
Hi,

This is a email a friend type of form, and it isn't working anymore.

<?

generating random codes
Hi guys n gals,

I have a requirement to generate 250,000 unique codes...

These codes a

Images in email problem
I found this script for sending emails, it works but if the email has <img src="image.jp

Form a inline view based on the results of the previous query?
Hi Experts,
Can we form a inline view on the results of a previous query (another inline view)?

Sum of Values in an Array
This is probably really simple... but it's been years since I've written anything, so bare with me!<

Last character removed
I have created a string from an array. I have inserted commas from my form values. I am trying to re

I got my hosting suspended XD
So I saw this challenge a day or so ago

http://www.programming-challenges.com/pg.php?page=dow

Batch Related Pricing
Hi, I need some clarity on the batch related pricing

For example the following are the b

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