What scenario do you have?

1. User fills in a form somewhere & those values get transmitted to another 
script which processes them
or
2. User fills in a form, clicks "submit" which calls the same script, 
passing itself the values. Depending on the value passed by the submit 
button, the script processes the information (INSERT or UPDATE) and sets 
$done = 1 if successful.

The second scenario is easier to handle.
Call the same script, passing it $done, and depending on whether or not 
$done is set you redirect.

Juli Meloni has done an excellent tutorial on just this at 
http://www.thickbook.com. look in the tutorials for something like "Form 
With Error Message". You just have to adapt the logic to suit your needs.

Miles Thompson

At 03:56 PM 11/25/2001 +0100, Daniel AlsÚn wrote:
>Hi,
>
>is there a way to redirect after a script has run?
>
>I have a form whos result is being put into a database. When, or if, the
>operation is sucessful i set a variable $done to 1.
>
>Now, i need a redirection from here (if $done is 1). But since i cant send
>out headers that far down on the page - what do i do?
>
>Regards
># Daniel AlsÚn    | www.mindbash.com #
># [EMAIL PROTECTED]  | +46 704 86 14 92 #
># ICQ: 63006462   |                  #
>
>
>--
>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]


--
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