#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Malmö
    Posts
    13
    Rep Power
    0
    I have a page whitch I load with different querystring variables. Sometimes (not every time!) i get a warning like this:

    Warning: Undefined variable: delete in
    /home/q/quickmes/www/alfa/history.phtml on line 42

    this happens when i do not use the variable (in this case "delete").
    This does not look good on my page...
    what should i do to get rid of the warning?
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    You can lower the error reporting level in php.ini
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Malmö
    Posts
    13
    Rep Power
    0
    Hi,
    Well I don't have access to the php.ini file (I've got my homepage at a webhotel).

    Is there any other way ?..
  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    You can set error reporting within a script using the error_reporting() function. It uses a bit mask for determining the types of errors/warnings returned. You want to turn off e_notice(mask 8). The remaining values are e_error(mask 1), e_warning(2), e_parse(4), e_core_error(16) and e_core_warning(32).

    So you should use:

    error_reporting(55);

    That should do the trick.

Similar Threads

  1. Replies: 3
    Last Post: February 10th, 2004, 11:19 AM
  2. Codepupil
    By Adachic in forum C Programming
    Replies: 3
    Last Post: February 6th, 2004, 06:50 PM
  3. syntax error : identifer 'Hole'
    By bootrecker in forum C Programming
    Replies: 2
    Last Post: February 2nd, 2004, 08:08 AM
  4. Replies: 4
    Last Post: January 28th, 2004, 08:29 AM
  5. I don't know what this error message means
    By lcham02 in forum Java Help
    Replies: 2
    Last Post: January 13th, 2004, 11:57 AM

IMN logo majestic logo threadwatch logo seochat tools logo