Jump to content
Larry Ullman's Book Forums

Add_Pdf.Php Question


Recommended Posts

Larry,

 

If an attempt is made to upload a file with a file size > post_max_size, add_pdf.php produces "undefined index" error messages with respect to the 'pdf' index referenced by $_FILES; and, the variable state messages indicate $_FILES is empty. Under these conditions, how does the switch contained under elseif(!isset($_SESSION['pdf'])) manage to work since $_FILES is empty? Will a default switch condition always work if the variable being tested is NULL?

 

I'm also curious why you changed the line of code in your book just above switch($_FILES['pdf']['error']) from simply else to elseif(!isset($_SESSION['pdf'])) before you made the script available for download.

 

Thank you,

Hacker

Link to comment
Share on other sites

 Share

×
×
  • Create New...