Voisine wrote:
> Hi,
> I'm learning php from a book but because of global off I have have
> several "Undefined index" message! I don't want to change the default
> setting in my php.ini because I want to learn the good way.
> What I'm doing wrong?
> Undefined index: categorie
> if ($_POST['categorie'] == "New") {

You're not doing anything wrong. The problem here is that error_reporting
has notices on. The $_POST['categorie'] is not defined.
Change the error_reporting to excluse ERR_NOTICE, or use:

if ( isset( $_POST['categorie'] ) && $_POST['categorie'] == 'New' ) }
    // Your code here


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to