Hi Sarah,
Here is one way you might go about it:
for the login table, you need 3 fields, username/company/password.
the sql query can be something like this.
"select * from login where username = '$username' and password = '$password'"
if it returns any rows, then it will be a vailid login. when this row returns, it will return the company associated with the username. so just define the company and you can use it in the image query.
you don't need a seperate table for each company, .. just a field in the image table called "company". your next query might look like this:
"select * from images where company = '$company'"
i'm sure there's many ways to do this, but this might be the easiest.
-Michael