Save written down text

I have my website similar to pastebin. There is a text box on the index.php and a captcha code to complete after you finish typing to upload the paste. If you enter the wrong code, as many do, including me, a new page comes up that says you mistyped, then when you go back to index.php then everything you have written in the text box gone? Isn’t cookies or cache that can save this?

Help please.

Here’s an GIF showing you how everything https://gyazo.com/dd3f3e1de8f95c9a6a7c8e8d6689023a

When you do that, you get a new captcha SO no matter what you originally entered, it will be wrong for the new captcha.

OR am I misunderstanding.

Here’s an GIF showing: https://gyazo.com/dd3f3e1de8f95c9a6a7c8e8d6689023a

If you failing when writing captcha everything you written disappears.

I want: When you go back everything will should be there, but now it isnt

I agree that only the captcha should be empty while returning to the same page and the rest of the form, whatever it is, should be remain filled.

Javascript could do the job much easier and should solve the problem for this, though if you want a javascript free page (that is, that even works with perfectly with JS turned off) you may want to use cookies instead

Hello there! I don’t now which is best? Javascript or cookies? What do you think, whats the benefits?

Do you know what code to use, maybe you can help me? :=)

Show us the code you have to draw the form, and to process the input, and someone will show you where it needs to be edited. Basically where your error-checking happens, you need to either stick the text you want to keep into a cookie so that the form can retrieve it to populate the text box value field, or generate the form from your php code and output it from there.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.