Form posting to itslef help needed

Hi, everyone

I have a user registration form on my site and it currently Send the data to another php script which when there are any errors displays it on new white page with ‘echo’ . What I would like is the registartion page to send its submitted content back to itself for checking, so that if any errors I can display them next to the appropriate field, Below is my code on registration.php, All help apprecaited

Hi there,

I’m afraid you haven’t posted your code, but I’ll give you a couple of suggestions anyway.

Would it be possible to make the form post to itself (action="") and then have an include() for the registration.php - that way the error variables will be available when the form has been posted and registration.php has been run.

If you cannot include that file for some reason, you could always do some sort of redirect with get/post data that contains the errors (php function - “header(‘Location:’)”. JavaScript function = “window.location = ‘’”)

Sponsor our Newsletter | Privacy Policy | Terms of Service