oh, well then one form and maybe some Javascripting to make sure they
properly entered a username and password and selected an image.
This would all happen on one PHP script (not two). You can use the
script to upload the image and then move to the proper directory using
the username and password.
I like using this Javascript for form validation:
http://www.massimocorner.com/validator/index.htm
Sorry I don't have time to write a complete script (holiday weekend you know),
but you only need one form and one script (you can even make them the
same file, calling itself if you want). All in one script.
What happens with the login? Do you compare the username and password
to something in a MySQL database? How you do determing which
directory to go, and how are the directories secured?
With more information on what your site is supposed to do, and the purpose
of the script ... we might be able to provide some better examples.