Notice: Undefined index: ???

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

    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?
    It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
    ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
    ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
    キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

    #2
    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.
    LDSWAPWORLD sigpic
    site closed.
    im busy with other things in life like facebook , send me PM so i can add you
    www.pinoySG.com

    don't ask for help if you're not even helping yourself!
    i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


    Comment


      #3
      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
      It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
      ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
      ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
      キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

      Comment

      Working...
      X