Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7713529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:53:55+00:00 2026-06-01T01:53:55+00:00

My dates in mysql database are setting to 1999-11-30 no matter what I enter

  • 0

My dates in mysql database are setting to 1999-11-30 no matter what I enter from my php form.

$degree_date = date("Y-m-d", mktime(0,0,0,$dt,$mo,$yr));
$other_degree_date = date("Y-m-d", mktime(0,0,0,$dty,$moy,$yry));
$expd_degree_date = date("Y-m-d", mktime(0,0,0,$dti,$moi,$yri));

Examples:

1. Date of Award
<select input name="dt" type="text" id="dt">
<select input name="mo" type="text" id="mo">
<select input name="yr" type="text" id="yr">
2. Date of Award
<select input name="dty" type="text" id="dty"> 
<select input name="moy" type="text" id="moy">
<select input name="yry" type="text" id="yry">
3. Date of Award
<select input name="dti" type="text" id="dti">
<select input name="moi" type="text" id="moi">
<select input name="yri" type="text" id="yri">

Insert statement:

$sql_insert = "INSERT into `acadmic`
`degree_date`,`other_degree_date`, `expd_degree_date` 
)
VALUES
'$degree_date', '$other_degree_date','$expd_degree_date',

I am getting messages that $dt $mo $yr etc aren’t defined
Any help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T01:53:56+00:00Added an answer on June 1, 2026 at 1:53 am

    A google search for “‘1999-11-30’ mysql php” came up with a non-bug on the first hit to explain why “1999-11-30” could be your result:

    There is no bug here, 00-00-00 means 2000-00-00, which is 1999-12-00, which is 1999-11-30. No bug, perfectly normal.
    

    I tested echo date("Y-m-d", mktime(0,0,0,0,0,0)) and that does print out 1999-11-30 as described in the reported PHP bug.

    You may want to investigate whether your variables ($dt,$mo,$yr) actually have the correct values set from the form to begin with.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my PHP app, I get dates from the MySQL database, when I format
I'm retrieving a date from a MySQL database that shows up like this: '2010-03-09
I'm currently storing dates in my MYSQL database as a PHP timestamp (integer field).
My C# application have to read some date from MySQL database. Problem I have
I need to convert a bunch of dates in a MySQL database from Pacific
I am setting a Database value within from a PHP file. In php file
i have come across a mysql database which has dates entered in a varchar
In one of my Mysql database table the dates are stored in the format
I have a mysql database of entries with dates. So what I want is
I have a table with a field of type date within a MySQL database.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.