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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:57:43+00:00 2026-05-17T20:57:43+00:00

I have a text field for documentation, which is working good. Now the problem

  • 0

I have a text field for documentation, which is working good. Now the problem is whenever user enters some new text into it. I need a date in format(dd.mm.yy), that should be attached to it automatically, with the time stamp.

For example, when the user first enters, "Problem with production". then clicks save then it should display as
19.10.10 16:39 "Problem with production".

After that if someone else changes the field and adds, "In development phase".

it should be 19.10.10 18:39 "Problem with production", 29.10.10 16:59 "In development phase".

While sumbitting the form, i am not able to track the text that is newly added. As i will get the complete text in post variables.

I found a dirty trick, placing some wierd character after saving the text. Now in my post variables, i will be able to differentiate what is the old text and what is newly added. Add current time stamp to the newly added one.

I would be glad if some one can suggest me a better procedure.

Thanks in advance!

  • 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-05-17T20:57:43+00:00Added an answer on May 17, 2026 at 8:57 pm

    Off the top of my head a couple of options:

    (a) With JS – change trigger

    Some javascript on the text field that triggers sets a value in a hidden form field. This field is posted back to PHP so it knows the text field may have changed (still can’t tell if the user changed it then changed it back).

    eg. JS trigger on field change.

    <input type="text" name="textfield" 
       onChange="this.form["textfieldchanged"].value=1;" />
    <input type="hidden" name="textfieldchanged" value="" />
    

    (b) With PHP – change detect

    Upon form submit check the current version of the field with the submitted version, if it’s changed then store the new version.

    eg. PHP compare

    if ($_REQUEST["textfield"]!=$current_textfield) {
      //...
    }
    

    In both cases, when actually storing the value, now just add a date from PHP.

    code: final PHP piece

    function storeText($text) {
       $date=Date();
       //Store $text+$date .. file, SQL, not sure what you're doing here.
    }
    

    You could also use JS to set a date on a hidden field when the text is updated (rather than a flag). This has the advantage that the local-system date is included with the form-submit (especially helpful if users are in different timezones) but has the disadvantage users could game your software by changing their local clock when they’re submitting entries… imagine someone wanted to appear to have added text before someone else, they could just set their clock back – make the submit – set the clock to the correct time and carry on.

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

Sidebar

Related Questions

I have a type ahead text field, and when the user hits Enter I
In a SQL server database, I have a table which contains a TEXT field
I have the below linq query which takes a text field which may be
I have a text field (flash.display.textField) for editing, but the default font does not
If I have a text field with SWT, how can I get the field
I have a Tix.ComboBox with an editable text field. How do I force the
I have a JQueryDialog with a text field, an OK button and a cancel
I have a table with each cell containing a label and a text field.
Previously I have asked to strip text from a field and convert it to
I have an input field where both regular text and sprintf tags can be

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.