Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8042101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:27:41+00:00 2026-06-05T04:27:41+00:00

Hello there stack members, I currently have a error report I wish to show

  • 0

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
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:27:45+00:00Added an answer on June 5, 2026 at 4:27 am

    If you want to make reusing the same html structure easy, you could use a function to echo it.

    function echoError($name, $description) {
        echo "<p><b>Error Name:</b> <u>$name</u><br>";
        echo "<p><b>Description:</b> <u>$description</u><br><br>";
    }
    

    Making your entire code look something like this:

    <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'>";
      <?php
        $error_found = false;
        if(empty($_GET)){
            echoError("VAR_M", "No Variables Sent");
            $error_found = true;
        }
        if(empty($_GET['key'])){
            echoError("API_KEY", "Missing API-Key");
            $error_found = true;
        }
        if(empty($_GET['url'])){
            echoError("URL_M", "Missing URL");
            $error_found = true;
        }
        if ($error_found) {
            echo "<HR size='1' noshade='noshade'><h3 align='center' class='style1'>X Auth /1.0.1.GPX</h3>";
        }
      ?>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello is there any way to create something like diablo hp/mana orb? https://i.stack.imgur.com/LAsDB.jpg I
Hello there people of stack overflow, I have just started developing with android and
Hello there Stack Overflow, I hope you'll help me with my very first question
Let's say I have these two arrays: string[] arr1 = new string[2]{Hello, Stack} string[]
Hello there once again... I came up with an strange idea but I have
Hello stack overflowers, I have a desing that uses the flyweight pattern to share
Storing objects in heterogeneous vector with stack-allocated objects Hello, Say I have an abstract
Hello Stack Overflow i hope you are well today; I have a form that
Hello Stack Overflow Experts, i have need of your expertice: I am trying to
Stack<String> sk = new Stack<String>(); sk.push(Hello); sk.push(Hello1); sk.push(Hello2); There are two ways i am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.