At 09:49 PM 12/18/2001 +0100, TD - Sales International Holland B.V. wrote:
>Also I'm looking for a small feature of HTML. I know this isn't the right
>list so if you guys don't reply no hard feelings. At this moment I use meta
>to refresh (go back to the form) after entering the data, you'll see a page
>that it's succeeded (or failed for that matter) and than after 3 secs you'll
>go back to the main empty form. However, I'd like to know a way other than
>meta, since when an error occurs it can happen the HTML header is already
>printed out and thus I can't use the meta tag anymore. I was thinking about
>javascript or something but other ways are welcome since javascript can be
>disabled in the browser.

Unless I'm misunderstanding you, something like:

<?
header("Location: http://www.php.net/";);
?>

should do the trick.  No need to mess with meta refresh tags.  Have your 
form post to itself and at the top of the page do your data validation.  If 
the validation failed, set an error string and display it at the top of the 
form.  Otherwise, use the header() function to direct them to the next page 
on your site.  The only drawback is that if you need variables on the next 
page you'll have to pass them as an URL parameter...

http://www.php.net/manual/en/function.header.php


---------------------------------------------------------------------
Michael Sims
mhsims at midsouth dot rr dot com

"The Web site you seek
Can not be located but
Countless more exist."
---------------------------------------------------------------------


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to