How do you protect form text field after a submit error?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
3dron
Forum Commoner
Posts: 40
Joined: Sat Feb 01, 2003 10:25 pm

How do you protect form text field after a submit error?

Post by 3dron »

I have a form that adds form data to a mySQL database. One of the fields in a large text field that sometimes has 5-15 sentences entered.

Some of my inputers are on 56k lines that fail a lot. If connections fails at submit time, when they hit back all the data is gone. They are losing lots of input time retyping the field.

What is the best way to protect this data from "vanishing"?

RR
JPlush76
Forum Regular
Posts: 819
Joined: Thu Aug 01, 2002 5:42 pm
Location: Los Angeles, CA
Contact:

Post by JPlush76 »

have you tried making the value of the field the post variable?

IE

Code: Select all

<?php

echo '<input type="text" name="test" value="'.$_POST['yourvariable'].'">

?>
or if you have access to the php.ini file you can change your cache limiter setting to blank... ''
Post Reply