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 7808383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:07:13+00:00 2026-06-02T03:07:13+00:00

i know that XAMPP has got many issues on Win 7. So i installed

  • 0

i know that XAMPP has got many issues on Win 7. So i installed it succesfully and now i have unspecific errors which i’ve never had before.

I have a simple -tag in HTML

<form method="post" action="site.php">
  <input type="text" name="NAME">
</form>

And my PHP code is also just that simple:

<?php 
  $something = $_POST['NAME'];
?>

When i start XAMPP and open this HTML in “htdocs” there is an issue/Notice:

Notice: Undefined index: wert in C:\xampp\htdocs\test.php on line 40

Is that just an XAMPP error?? Because i’ve never had this issue before and it seems quiet correct. I’m using XAMPP 1.7.7 i suppose.

Greetings 🙂

  • 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-02T03:07:15+00:00Added an answer on June 2, 2026 at 3:07 am

    The ‘Undefined index’ notice pops up when you use the value of an array index which has not been set until then:

    <?php
    $myarray = array('a'=>1, 'b'=>2);
    var_dump($myarray['a']); //outputs int(1) as this is defined
    var_dump($myarray['c']); //we defined 'a' and 'b' but not 'c'.
    ?>
    

    The third line will give: “Notice: Undefined index: c in C:\xampp\htdocs\test.php on line 3”.

    This is something that typically occurs when you access the $_GET or $_POST arrays. Most often, the reason is that you mispelled the index (e.g. you typed $_POST['tset'] instead of $_POST['test']) or because you edited an <input> element in the HTML form which submits the information and then forgot to readjust the PHP code.

    You can make sure that everything is working fine by testing if the index exists using isset() like so:

    if( isset($_POST['test']) ) {
        $myvar = $_POST['test'];
        //and then whatever else you intended
    }
    else {
        //the index wasn't defined - you made a mistake, or possibly the user deliberately removed an input from the submitting form
        $error = "POST-array is missing the index 'test'!";
        //and now make sure that things after this which rely on the 'test' value don't run
    }
    

    A very common line that you will find in a lot of scripts:

    $myvar = isset($_POST['test']) ? $_POST['test'] : 'N/A';
    

    This uses a special PHP shorthand of the if-else structure. This line does pretty much exactly the same as:

    if( isset($_POST['test']) ) {
        $myvar = $_POST['test'];
    }
    else {
        $myvar = 'N/A';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that exceptions have a performance penalty, and that it's generally more efficient
I know that this has already been asked here but the answer (using a
I have a folder running locally that contains a website. It runs on xampp
I have a CI app that has a auth controller and switchuser function. Basically
I have installed xampp on my Ubuntu machine, and would like to be able
I've got XAMPP installed on my Windows 7 Computer. I've been developing on it
I know that it's a subject that can raise a lot of debate, but
I know that one of the differences between classes and structs is that struct
We know that behind the scenes, the ASP.NET MVC framework will use reflection to
I know that I should put all the html elements in body tag, but

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.