This is exactly the type of post that wastes people's time.
The statement "I'm trying to link a database to the website" is almost laughably vague.
If it were just as simple as "linking a database to a website," do you think there would be an entire profession devoted to this task?
I am suggesting that, at the moment, you are in over your head. If you really want to create an effective dynamic site, you should first actually study some PHP and SQL (unless someone here is willing to walk you through all the steps it would take to design and build the dynamic subsystem you're talking about).