[thelist] PHP's include() function

Jeremy Ashcraft ashcraft at 13monkeys.com
Wed May 29 15:45:00 CDT 2002


David Bindel wrote:

>There must be some kind of workaround or alternate function
>to die() or exit().  I'm sure someone else has had this
>problem in the past... could you please help me
>
You might try trapping the error and printing an appropriate message
instead of using die():

<?php

include("header.php");
$errmsg = '';

........

$qry = mysql_query($sql) or $errmsg = "Eloquent Error Message";

if($errmsg != '') {
    echo $errmsg;
} else {

    #continue on with the rest of the script

}

include("footer.php");

?>

HTH

jeremy




More information about the thelist mailing list