Hello there stack members,
I currently have a error report I wish to show - And Id like a static piece of html to be available for my GET errors.
Currently the way I have it
apicheck.php?key=dfdf - Displays a nice footer
apicheck.php?url=dfdf - Does not display footer as its currently referenced within the $_GET['url'] section.
What my ultimate goal is to have the html code somewhere around where the die function is as id like to have all 3 get error messages be able to display the HTML footer
Ive added the die function in so that I can keep the code separate from whats underneath
Im still quite new and this is my first type of adventure into anything like this
I wasnt too sure how to add the html anywhere else as it wouldnt be within one of the IF sections - id be grateful if someone could explain how to add it in other areas
<?php
echo "<html><head><title>Error Report</title><style>
<!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}.style1 {font-size: 9px}
-->
</style> </head><body>
<h1>API Authentication System 1.0.1 GPX</h1>
<HR size='1' noshade='noshade'>";
if(empty($_GET)){
echo "<p><b>Error Name:</b> <u>VAR_M</u><br>";
echo "<p><b>Description:</b> <u>No Variables Sent</u><br><br>";
}
if(empty($_GET['key'])){
echo "<p><b>Error Name:</b> <u>API_KEY</u><br>";
echo "<p><b>Description:</b> <u>Missing API-Key</u><br><br>";
}
if(empty($_GET['url'])){
echo "<p><b>Error Name:</b> <u>URL_M</u><br>";
echo "<p><b>Description:</b> <u>Missing URL</u><br>";
echo "</u></p><HR size='1' noshade='noshade'>
<h3 align='center' class='style1'>X Auth /1.0.1.GPX</h3>
</body>
</html>";
die();
}
else
?>