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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:37:12+00:00 2026-06-16T23:37:12+00:00

1i have been using html 5’s input type=date and found it very useful. i

  • 0

1i have been using html 5’s input type=”date” and found it very useful. i just wanna know if this is possible:

suppose i chose 1/01/2012 in the date picker

i want to save it on my database (mysql) but i want it to be like this ” January 1,2012 “

are there ways to do it and how?

require_once "includes/database.php";

$title=$_POST['txtTitle'];
$old_date  = explode("/",$_POST['txtDate']);
$new_date = $old_date[1].' '.$old_date[0].','.$old_date[2];
$date=$new_date;
$from=$_POST['txtFrom'];
$to=$_POST['txtTo'];
$place=$_POST['txtPlace'];
$details=$_POST['txtDetails'];
$id=$_POST['txtEid'];   

        if($id==""){
            $sql = "INSERT INTO events (event_title,event_date,event_tfrom,event_tto,event_place,event_details) VALUES (:title,:date,:from,:to,:place,:details)";
            $qry = $db->prepare($sql);
            $qry->execute(array(':title'=>$title,':date'=>$date,':from'=>$from,':to'=>$to,':place'=>$place,':details'=>$details));
        }else{
        $sql = "UPDATE events SET event_title=?, event_date=?, event_tfrom=?, event_tto=?, event_place=?, event_details=? WHERE event_id=?";
            $qry = $db->prepare($sql);
            $qry->execute(array($title,$date,$from,$to,$place,$details,$id));
        }

    echo "<script language='javascript' type='text/javascript'>alert('Successfully Saved!')</script>";
    echo "<script language='javascript' type='text/javascript'>window.open('cms_events.php','_self')</script>";
  • 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-16T23:37:13+00:00Added an answer on June 16, 2026 at 11:37 pm

    Using javascript you can do something like this

        <button onclick = "getDate()">click for date</button>
        <script>
        function getDate(){
           var monthsOfYear = new Array("January", "February", "March", 
    "April", "May", "June", "July", "August", "September", 
    "October", "November", "December");
    
       var d = new Date();
       var currdate = d.getDate();
       var currmonth = d.getMonth();
       var curryear = d.getFullYear();
    
       alert(monthsOfYear[currmonth] + " "+currdate+","+curryear);
    }
    

    Hope this helps..

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

Sidebar

Related Questions

I have been using jQuery prettyPhoto plugin to show inline html content. This content
I have been using this: http://blog.leahculver.com/2010/12/iphone-pull-to-refresh.html to make the pull to refresh function in
I have been parsing this website for my windows phone app using Html agility
I have been using HTML Parser to scrapping data from websites and stripping html
I have been using Sandcastle Help File Builder to produce help files (HTML 1.0)
I have been trying to make custom radio buttons using HTML, CSS, and JavaScript.
I have been using an API to do some work. This is how I
I have been using Pear W3C HTML Validator to validate websites in house. We
have been using no DOCTYPE but rather simply starting with <html> as per HTML5
I have been using PHP's DOM to load an html template, modify it and

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.