Yes for the current line and file you can use the magic constants __LINE__ and __FILE__.
For the call stack, you can use debug_backtrace() though you'll want to run that through var_dump(). It will give you an array of arrays with things like function names, line numbers etc.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.