Notice: Undefined index: ???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • metulj
    replied
    Originally posted by capofret View Post
    from google. lol:p
    This error appears because of your PHP error reporting settings. Usually, it appears when your variable is not properly set. There are two ways to handle this issue:
    1. Check if $_POST['action'] is set before using it. For example:
    if (!isset($_POST['action']))
    {
    //If not isset -> set with dumy value
    $_POST['action'] = "undefine";
    }
    2. Suppress Notice warnings
    Notice warnings could be suppressed by changing the error_reporting variable in your PHP.ini. error_reporting could be set to show all errors except those for notices and coding standards warnings: error_reporting = E_ALL & ~E_NOTICE
    The same is accomplished by adding the following line in your php page:
    <?php error_reporting (E_ALL ^ E_NOTICE); ?>
    it may be your ($_POST['submit'])
    ahhh LMAO stupid me!
    i've deleted wrong line in code...
    where value for
    PHP Code:
    ($_POST['submit']) 
    was set...
    i just couldnt notice that lmao
    all ok now
    tnx

    Leave a comment:


  • capofret
    replied
    from google. lol:p

    This error appears because of your PHP error reporting settings. Usually, it appears when your variable is not properly set. There are two ways to handle this issue:

    1. Check if $_POST['action'] is set before using it. For example:

    if (!isset($_POST['action']))
    {
    //If not isset -> set with dumy value
    $_POST['action'] = "undefine";
    }

    2. Suppress Notice warnings

    Notice warnings could be suppressed by changing the error_reporting variable in your PHP.ini. error_reporting could be set to show all errors except those for notices and coding standards warnings: error_reporting = E_ALL & ~E_NOTICE

    The same is accomplished by adding the following line in your php page:

    <?php error_reporting (E_ALL ^ E_NOTICE); ?>

    it may be your ($_POST['submit'])
    Last edited by capofret; 31.05.09, 14:39.

    Leave a comment:


  • metulj
    started a topic Notice: Undefined index: ???

    Notice: Undefined index: ???

    this is error which i get displayed on site
    Code:
    Notice:  Undefined index:  submit in C:\server\www\mz\somesetup.php on line 40
    line 40 is like this:
    PHP Code:
    {    if($_POST['submit'])/// <= this is line 40
    echo "<body>";
    ...........................................................
    ...................... 
    some code..................
    ..........................................................
    echo 
    "<form action=\"\" method=\"post\">";
    echo 
    "<br/>";
    echo 
    "<input type=\"submit\" value=\"[INSTALL]\"/>";
    echo 
    "</form>";
    echo 
    "</body>";
    echo 
    "</html>";
    die(); 
    so, whats wrong with that 'submit' in line 40 ?
    or with other words...
    how to write this code properly?
Working...
X