N/APosted on - 09/07/2012
I have done html codes connected to PHP and I want to know if it is possible for me to make multiple pages without connecting a database using PHP programming language. And if it is possible, where can I download sample html codes and PHP codes to connect it to the database.
More about free html codes for multiple pages
HTML is a client side coding language and PHP is server side. So when you want to connect your page to your database you have to do it from the PHP page you have as that is the server side language. HTML will just structure your page nicely so the user can view it. Here i am providing you with a simple code that connects your database with your php file:
$con = mysql_connect("localhost","peter","abc123");
die('Could not connect: ' . mysql_error());
// Code you want to write when the connection is established