[thelist] PHP help needed

M. Seyon evoltlist at delime.com
Mon Nov 28 20:09:44 CST 2005


Hi Flavia,

>The problem is selecting the images from the images folder.

PHP's file system functions seem pretty straightforward. Have you tried 
anything like this?
http://www.php.net/manual/en/function.scandir.php



>I have been struggling to write the right code to grab the username from
>the form and then use that in the path to the images (I thought it would
>be a good idea to have folders named after the username inside the
>images folder like images/user1, images/user2 and the whenever the user
>logs in with the username the username is then added to the path to the
>images and all images in that specific folder are loaded...
>But since I *know* only 4 images are to be displayed then the images can
>be put in the images folder together but the name of the images need to
>be user#_1.jpg, etc....

I would not do this if the #user# string is a number. Otherwise user001, 
after getting bored viewing user001_01.jpg, user001_02.jpg, user001_03.jpg, 
user001_04.jpg may decide to check out user002_01.jpg, user003_01.jpg, etc.

Heck I wouldn't do this password protected at all, given the nature of the 
content.


>*And yes, I did explain to the client about the security issues of not
>having a password and not validating the password/username but she
>explained it was not a matter of safety as the images were for public
>display anyways. The images are screenshots taken during ultrasound
>exams

I don't know myself, but have you checked whether ultrasound images need to 
be protected under HIPAA? I'd be very cautious about implementing a system 
like that with no authentication.

regards.
-marc




More information about the thelist mailing list