please read twice before answering as it may confuse you.
Here is what I have now —
My webhost allows for custom error pages (which I like and use)
[INDENT]Problem — the page must be named errnum.shtml (e.g. 404.shtml) this is the only way the custom pages work. however all my pages in my site are php.[/INDENT]
I have found that I can use
[code]<meta HTTP-EQUIV=”REFRESH” content=”1; url=error.php”>
to redirect to my real php error page on which I have built a error submit form which I would like to get all the HTTP data (requested page, referring page, browser, etc.) sent as well as a user’s email addy (if they wish to have an answer back) and any comments they need to make or a question re: the error encountered.
using this format is not acceptable as the requested page comes up as /error.php (from the redirect NOT the original requested page) this does not help at all (bogus data)
how I found that I can insert
[code]<!–#echo var=”REQUEST_URI” –>
and it will show on the shtml page (does not submit form but provides the correct data) but submitting he form to the PHP page the data is blank.
the shtml page has this for code
[code]<form id=”submiterror” action=”error.php” method=”post”>
<table summary=”404 submission information” align=”center”>
<tr><td class=”left”>Requested Page:</td><td class=”right”><!–#echo var=”REQUEST_URI” –></td><td class=”right”><input name=”reqURI_1″ type=”hidden” value=”<!–#echo var=””REQUEST_URI”” –>” /></td></tr>
<tr><td class=”left”>Referring Page:</td><td class=”right”><!–#echo var=”HTTP_REFERER” –></td><td class=”right”><input name=”RefURL_1″ type=”hidden” value=”<!–#echo var=””HTTP_REFERER”” –>” /></td></tr>
<tr><td class=”left”>Your IP Address:</td><td class=”right”><!–#echo var=”REMOTE_ADDR” –></td><td class=”right”><input name=”visIP_1″ type=”hidden” value=”<!–#echo var=””REMOTE_ADDR””‘ –>” /></td></tr>
<tr><td class=”left”>Your Browser:</td><td class=”right”><!–#echo var=”HTTP_USER_AGENT” –></td><td class=”right”><input name=”visbrow_1″ type=”hidden” value=”<!–#echo var=””HTTP_USER_AGENT”” –>” /></td></tr>
<tr><td class=”left”>Server Name:</td><td class=”right”><!–#echo var=”HTTP_HOST” –></td><td class=”right”><input name=”svrname_1″ type=”hidden” value=”<!–#echo var=””HTTP_HOST”” –>” /></td></tr>
<tr><td class=”left”> </td><td class=”right”> </td><td class=”right”><input name=”redirectcode_1″ type=”hidden” value=”<!–#echo var=””REDIRECT_STATUS”” –>” /></td></tr>
<tr><td class=”left”> </td><td class=”main”><input type=”submit” value=”Send Error Report” /></td><td class=”right”> </td></tr>
</table>
</form>
<script language=”JavaScript” type=”text/javascript”>
<!–
document.forms(“submiterror”).submit()
//–>
</script>
to see it formatted go to [url]http://www.mainenotarynet.com/ish
this will produce an error and the data will be correct on the page as it shows the data that is going to be submitted but does not allow changes (note the Inputs are hidden)
The values show on the screen in the 2nd <td>s as they are just displaying and not input values.
The 3rd <td>s are the inputs and getting this data in the value=” ” attribute is where I am encountering problems.
I have tried:
[LIST][*]
value= with single quotes to leave the inner var= with the double quotes
value= with doubles and cahnging the var= to singles
value= and var with dobles which is what the copy/paste would do
I found the script to auto-submit the form (which btw does not work (commented put the meta tag) to test it
What I need —
I need the data from the 404.shtml file (correct data) form to be processed by the error.php file (using $_POST[‘variable’] to show/input the data [now shows as blank]) and then the REAL error.php page will TRUELY be prossessed and send me an email of the error using phorm and sendmail()
the error page itself can be found at [url]http://www.mainenotarynet.com/error.php
The form is at the bottom of the page (if you view source it)
This did work when using the php variants of the $_SERVER[‘varnames’] variant of the #echo statements in the shtml code above although the data was bogus for the referrer (always came up blank) and re quested page (always showed /error.php)
this MUST be in HTML NOT php/c+/javascript as the shtml page needs to autosubmit the REAL info to the REAL error page
Any suggestions in doing this is greatly appreciated and welcomed but please understand what I need BEFORE answering as I must have my error page in .shtml for with either the META redirect – (which would cause a blank form as the form would never be submitted – unless in that META tag is an option I can add to auto-submit) to the true php page
a javascript to auto submit – since the one I copied does not work in the shtml page.
Thank You
Kevin M Carman
Maine Notary Net
Bangor, ME