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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:43:46+00:00 2026-06-01T05:43:46+00:00

Hi I’m trying use a datepicker on a field I have. I’m trying to

  • 0

Hi I’m trying use a datepicker on a field I have. I’m trying to set the date field up so the user can only edit this field if the date value in the database is set to deafault (0000-00-00). If there is a value that’s not equal to default I want to show the date created.

Here’s the code I have attempted:

          if( $post['Date'] = var_dump(checkdate(00, 00, 0000))){ 
          echo "<input type=\"text\" class=\"datepicker\" name=\"pDate\" style=\"border:#000099; margin:10px;\" value=\"";
          echo $post['Date'];
          echo "\"> <input id=\"start_dt\" class=\"datepicker\">";
          }
          if( $post['Date'] != var_dump(checkdate(00, 00, 0000))){ 
          echo "<span>date created: </span>";
          echo $post['Date'];

          }

It’s not working atm so any help or a point in the right direction would be great.
Please also take into account I haven’t added any proper styling so I’m only after help with the functionality.

Many thanks.

  • 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-01T05:43:48+00:00Added an answer on June 1, 2026 at 5:43 am

    var_dump() is used for debugging purpose rather than inside conditional expression. Next, using = assigns the values not checks for them. You are assigning the values of var_dump() results to $post['Date'] So change them to ==

    You should be trying to to something like this

      if( $post['Date'] == checkdate(00, 00, 0000)){ 
          echo "<input type=\"text\" class=\"datepicker\" name=\"pDate\" style=\"border:#000099; margin:10px;\" value=\"".$post['Date']"\">";
          echo "<input id=\"start_dt\" class=\"datepicker\">";
      } else {
          echo "<span>date created: </span>";
          echo $post['Date'];
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
This could be a duplicate question, but I have no idea what search terms
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

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.