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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.