Thanks but it still returns "Success" on a failure. If anyone knows if it is even possible to assign the output of system, passthru or exec to a variable to check for success or failure and how to do it, please advise. The $status variable seems to always be empty on success or failure when I try to echo it.
"Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Wednesday 10 July 2002 13:27, Fargo Lee wrote: > > Thanks for pointing out the syntax error. I added the space after the -u > > but it did not make any difference. It still gives the same result, that is > > "Success", when it actually fails. What I am trying to figure out is how I > > can tell if it failed (did not create the tables)? The $status variable > > does not appear to hold the output of the system() function. Anyone know > > how to get the output of system, passthru or exec into the $status variable > > to check for success or failure? > > Your test for failure should be: > > if ($status === FALSE) > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > Extreme fear can neither fight nor fly. > -- William Shakespeare, "The Rape of Lucrece" > */ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php