well what i want is if my php page generates any error it should automatically redirect to my index.php.
please note any error (mysql or sytqax or anything else. )
Read this article, it explains everything.... http://aspn.activestate.com/ASPN/docs/PHP/features.error-handling.html