0

As shown in the error the get variable is set in the URL. But everywhere that I check the variable it gives the same undefined index error. When I check isset($_GET['uploadtype']) it returns 1. Also the code in between the below if statement runs. Why does this error keep popping up in my apache error log?

if($_GET['uploadtype'] == "document"){

PHP Notice: Undefined index: uploadtype in /var/live/artistreports/views/upload/index.php on line 46, referer: http://www.saint57records.com/artistreports/upload/index?uploadtype=document

Michael St Clair
  • 5,937
  • 10
  • 49
  • 75
  • why does that matter, I've made it so that the variable is always set – Michael St Clair Jul 11 '15 at 18:18
  • @u_mulder the OP clearly wrote that he did that. – arkascha Jul 11 '15 at 18:19
  • 1
    We can only guess by the little information you provide. It _might_ be that the variable is sometimes set and sometimes not. That way it might happen that when you check it you verify that it is indeed set, whilst on other requests you get that notice thrown. But as said: we can only _guess_ here. – arkascha Jul 11 '15 at 18:21
  • 1
    check the content of $_GET variable using var_dump. See what it contains. – Imran Jul 11 '15 at 18:21

0 Answers0