SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2001
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do you surpress the following PHP Warning:
    Undefined variable: submitjoke in C:\Inetpub\wwwroot/php/deletejokes.php on line xx

    Basically, there is an HTML form on the .php page but through the use of the PHP if: else: contol structure the PHP variable $submitjoke created by the NAME="submitjoke" form attribute is not processed at that time leading to the undefined variable.

    I hope I was clear!
    Steve

  2. #2
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It sounds like PHP is running in 'safe mode' of some sort - do you have control over the php.ini file? If so post it on here (or private message the file to me) and I'll point out what's wrong with it.

  3. #3
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you post the code? Is this from Kevin Yank's tutorial? I did Kev's tutorial earlier this year - and came accross some bugs that occured because of language changes between PHP3 (which he wrote the tutorial in) and PHP4.

    For example:
    if ("SUBMIT" == $submitjoke)
    Causes an error in PHP4 if $submitjoke is not set

    but:
    if ($submitjoke == "SUBMIT")
    Works regardless of whether $submitjoke existed prior to the conditioinal statement!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •