Forum Moderators: coopster
Yes, you could do this with PHP and MySQL. The first thing to ask is whether you've looked at any photo gallery scripts that are already out there. Perhaps gallery or coppermine or one of the other major PHP gallery scripts has this ability already (I don't know, but I'd start there).
Otherwise, what you would probably want to do is create a database table that has fields like
-filename
-title
-description
for your photos and then use a full text index [dev.mysql.com]. I think this is probably running way ahead of you though. To backtrack, check out the thread Jatar_K started on Learning PHP [webmasterworld.com]. That will get you going, but I think you may find this fairly complicated, so first spend some time on google seeing if something already exists that you can just use off the shelf.
Tom