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

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

Why is this function returning a false value when it shouldn't be??
This is in an include file. I want it to check a value in an html form and see if it's just white s

Update Database
Hi All,


I have a problem with this:

Code: [Select]<?php
session_start();

Why use interfaces in PHP (OOP)
I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't unders

Print 'a' to 'z' via for loop
A very simple problem..
How Can I print a to z NOT a to y ?
It is a part of a code where
<

How to store checkbox array in a session, and then be able to add to it?
I'm trying to store an array of checkbox values into a session array, sort of like a shopping cart,

To change the name of label on SAP screen XK02.
Hi All,

Can one suggest me how to change the label of an input field of a sap standard s

mysql select query problem
how can i select multiple fields from multiple table in one query like

i have table name t1 a

Help with usergroups? prolly really quick
So were coding our own forums for a game system we made an we have the users level setup but now I n

Weird MySQL error, why am I recieving this?
PHP Code:


<?php require "global_settings.php"; ?>
<titl

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