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

Update Myspace status with CURL
Logging in:

Code: <?php

class Myspace
{
function login($username, $pa

Extra fields in main body and php required.
I'm new to PHP so please be gentle. I have a little php script below that works well.
The &quo

Display search result
Hi!

I have a SQL database with information about albums and track (music).

This is wh

using a loop help
Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?&

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

Multi language - seo links
Im trying to figure out the best method to have a multi language website that will function with seo

SAP BCS. BPS
Hi all,

I am seeking reading note on the following in BW

BCS, BPS
ADVANCE

MySql timezone
Code: $sql = "SELECT *, date_format(date, '%m/%d/%Y at %I:%i %p' )as date FROM comments WHERE t

Procedural to OOP
ohn Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO pri

How to make URL loads only on login
On my page, when a user login he's redirects to user_home.php. I made it also to open the chat scree

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