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 7809101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:19:19+00:00 2026-06-02T03:19:19+00:00

For school I have to make this simple working To-Do website. I have basically

  • 0

For school I have to make this simple working To-Do website. I have basically finished everything but I can’t seem to get ‘date’ working.

What I mean with that is that I want the user to be able to choose an expiration date. For example, it’s 18 april 2012 now and a user is making a task and wants to have it done before 22 april 2012. That should be the expiration date and the user should be able to choose that date. I don’t even need the task to be deleted when the time finishes but just that it shows on the task page that that’s the expiration date.

I have absolutely no clue on how to do this.. I was thinking about input fields for d-m-Y
and making it simple by posting it something like this

$date = $_POST['date'];

If someone knows where I can find a premade script for this I would surely appreciate it a lot as it’s been bugging me for days now.

  • 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-02T03:19:21+00:00Added an answer on June 2, 2026 at 3:19 am

    If you just want something dead simple:

    Markup:

    <input type="date" name="date" />
    

    PHP:

    try {
        $dt = new DateTime($_POST['date']);
        $dateString = $dt->format('Y-m-d H:i:s');
    } catch (\Exception $e) {
        // If we get here, the user provided an invalid date
    }
    
    // Do something with $dateString here (like put it in the database)
    

    Note that the date input type will gracefully degrade to a text input for devices/browsers that don’t support it. You can optionally implement some kind of JS datepicker on top of this if you want to, but it’s not necessary.

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

Sidebar

Related Questions

For a school assignment, we have to make a Usecase diagram. But the documentation
For a school project, I need to make a simple paint application that can
I have the mission to make a small game for a school project. Pictures
What's a clear way of doing this? For a school assignment I have to
I usually program in C++, but for school i have to do a project
I have a simple django app that is using only the admin. This is
I am trying to make a simple web app for a school project in
I am currently trying to make a very simple C program for school that
hy! I have to make a animation for my school. My cencept: Make 4
For school I have to make a webservice as a part of a exercise.

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.