Dave,

You can return a value from a function ...

function dosomething( para1, para2 )
{
    code here
    which depending on success or failure sets $reflag to 0 or 1
    return $retflag;
}

So now the question is "Can we return a value from a script?" Hell, I don't 
know, why not just try it?
My gut feeling is that it would go to the browser, not to the calling program.
Interesting question.

Cheers - Miles

http:/www.php.net
At 02:26 PM 5/10/01 -0400, Dave wrote:
>to tie in web based scripts and database updates with some server side
>authentication issues, we need to have a PHP script be called from
>another program.  The program expects a return or exit value to be
>transmitted back on completion or termination of the script.  0
>indicating success and anything else indicating failure
>
>PHP has exit() and die() which, all though you can place a variable or
>string in
>it, only prints it to the screen (or other output target) prior to
>killing itself, and does not send an exit code as would a perl script
>
>is there any way to generate a exit code on the completion of a php
>script that will be  interpreted by the program or CGI calling the
>script, even if it is code to wrap the PHP script in yet another perl
>shell.  We need to send some variables back from the PHP script to the
>terminal as open text (just printed to the screen), but the program is
>specifically waiting for the exit code.
>
>really want to avoide writing a perl/dbi script to carry out this
>function.
>
>Appreciate any insight
>
>Dave
>
>
>--
>PHP Database 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 Database 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