PHP is a scripting language parading as a "real language" while JSP is a real language, but often overkill for simple web page delivery.
Personally, I prefer to put business rules and such in a database, and use PHP to pull out the data and display it nicely, munge it a bit, and put it back in, while relying on the database to make sure it's all coherent data.
Yes, PHP can do the graphics thing quite well, via the gd library, which lets you build png/jpeg images and toss them on the screen. PHP doesn't have the huge amount of pre-made classes java has, but it's built in functions are very easy to use, and quite expansive. Take a look at all the things it can do by reading the docs at www.php.net