Well, first, please make your subject something that pertains to your problem. Every post here is not working!
LOL It helps as some programmers here know a lot about some things more than others and you get more
responses that way.
Now, first MySQL is no longer used on a lot of servers. It has be predicated. The two options now are
either PDO or MySQLi (which stands for improved.) If your pages are hosted on your computer using
WAMP or XAMP, you should be able to use the localhost and root. But, if it is hosted online somewhere,
you may have to use a connection string that is set up by the hosting company. If so, you can look at your
control panel and there will be a sample for you there.
Here is a link for w3Schools which is a good tutorial on how to set up your connection… It might help you
a bit with the minor changes that are in the improved version of MySQLi.
http://www.w3schools.com/php/php_mysql_connect.asp
Lastly, you do not have any error checking in your database connection nor in your queries. You need to
add those as it will show what your problem is. For instance, you connect to the database and select the
“shop” database. But, you do not know if either the connection or db-selection failed. It would NOT give
you any error messages unless you check for htem and display them. It does not show these errors by
default. In the link I gave you, it shows how you need to check for the connection to see if it fails. If it
does fail, you can display the error and find out why. ( mysqli_connect_error() ) The code in the link
has that in place!
Hope that helps you sort it out. Good luck!