[PHP] Checking file type when uploading

2010-09-17 Thread Catherine Madsen
Hi! I have created a form following the PHP manual to upload files and need to restrict the upload to only PDF. How do I check the file type ($_FILES['userfile']['type']?) and where: on the form page or on the validation page? I want to be able to tell the users that their file doesn't have the

Re: [PHP] can't retrieve more than 1 record at the time still

2009-12-15 Thread Catherine Madsen
Thank you so much for sending me in the right direction. I've re-written the first part of the script using PDO statements and it works great. Catherine Richard Quadling wrote: 2009/12/14 Catherine Madsen : Hi Again, Following the suggestions I received from a earlier post,

[PHP] can't retrieve more than 1 record at the time still

2009-12-14 Thread Catherine Madsen
numberCand'] = $_SESSION['numberCand'] + 1; $stmt = NULL; /* release the connection */ /*if not done with stack, redirect to self to get next*/ if (!empty($_SESSION['DOCIDs']) and $_SESSION['numberCand'] < count($_SESSION['DOCIDs'])) { exit; } } /* once done, go back to display search page after clearing stack*/ if(isset($_SESSION['DOCIDs'])) unset($_SESSION['DOCIDs'] ); $_SESSION['msgs'][] = 'For '.$_SESSION['numberCand'].' candidate(s), '. $_SESSION['PHPulled'].' personal histories were loaded.'; exit; $res = null; $dbh1 = null; ?> -- Catherine Madsen Programmer Analyst College of Chemistry Berkeley, CA 94720-1460 TEL: 510-643-1706 FAX: 510-643-6178 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] can't retrieve more than 1 record at the time

2009-12-09 Thread Catherine Madsen
nts($PDF)); fclose($fh); /* add to $_SESSION['PHPulled'] for each new file saved */ $_SESSION['PHPulled'] = $_SESSION['PHPulled'] + 1; } /* increment stack counter */ $_SESSION['numberCand'] = $_