Jump to content

Php forms


Rubendo

Recommended Posts

Rubendo, if you want help here then you have to make a thread with a title that (briefly) describes what you are doing and a body that includes all the information we might need to know to help you. Because we don't know you, we don't know your site, and we don't know your code. We aren't psychic.

Link to comment
Share on other sites

When i putt submit value in those field must stay in field 

If I understand you correctly ...

"Locking" the user into an invalid field gives a terrible User Experience, especially when you start having multiple fields that are validated with respect to one another.  For example, given Start and End Dates, the user might enter the Start Date incorrectly but then gets "locked" into the End Date field because that is invalid with respect to the Start Date. 

 

Instead, validate all the fields, return/ display all the errors, then let the user sort out their own mess.  

Only once everything is valid do you allow the submit to continue. 

 

Regards,   Phill  W.

Link to comment
Share on other sites

i want to do it with seesions

 

Sessions shouldn't be necessary. Is your form in the same PHP script as the code processing the form? If it is, you could use the POST or GET variables to repopulate the form when there are errors. If you are using separate scripts, the script processing the form could use a PHP redirect to send the information back to the form using GET variables (when there are errors).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.