PHP Headers

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
jogen143
Forum Newbie
Posts: 15
Joined: Tue Mar 25, 2003 2:51 am

PHP Headers

Post by jogen143 »

I have a form where users can type data and register, the problem is Im validating this form on server side, to redirect to registration page if any of the mandatory fields are blank (header("Location:filename.php") ). The validation and inserting data to the database are done in a seperate php page. When redirecting to the registration page, the registration page does not have any data previously typed.

Is there any way to redirect to the registration page, showing the data previously typed.

Please treat this as urgent!

Thanks
User avatar
mchaggis
Forum Contributor
Posts: 150
Joined: Mon Mar 24, 2003 10:31 am
Location: UK

Post by mchaggis »

don't redirect, just re-include the form. In the form you want to file the value fields of the input tags with the correct data:

<input text="text" name="field1" value="<?=$field1?>">
Post Reply