how to automaticaly direct from one page to another php hmtl

RegisterLogin
how to automaticaly direct from one page to another php hmtl
Post Description: how to automaticaly direct from one page to another php hmtl
Tags: how, to, automaticaly, direct, from, one, page, to, another, php, hmtl
This Post Was Posted On Feb 29, 2008 By lesly #1279
i need some help, i have this website where it has a form, and after the from is submitted and all the checks have been done, i want it to automatically take the user back to the original page to where they were before without having them to click on a continue button or link, is that possible.

for example, my form is at form.php

once the form is submitted, it takes the user to submitted.php where i do all the error checks, once all the error checks are done and everything is ok, it adds the information into my database, then i prompt the user to click or enter the continue button. but i want it so that if there are no error, to just automaticaly send the user back to form.php instead of having them click to continue. can that be done?
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
hostman
#1709 1
yes it can be done you can use the header() funcion in php:

on your submitted.php file once all the checks are ok, you can use this code:



header('Location: http://www.yourwebsite.com/form.php');



this will automatically redirect the user back to form.php instead of keeping the user in submitted.php
Dec 24, 2007 Reply Report abuse
©2011 Webune Forums - Sun Dec 18, 2011 8:27 pm
Powered by: Webune Forums V3