just 3 hours?
not that much ... people with eager interest to learn spend days
sometimes until get the things done
your question is too open and may not be related to fancybox at all
anyway, check deeply the sample here
http://fancybox.net/blog No.5
or maybe you are looking for this
http://myphpform.com/
otherwise hire a developer ;)