More about free html codes for multiple pages

Asked By 10 points N/A Posted on -
qa-featured

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.

SHARE
Answered By 5 points N/A #152003

More about free html codes for multiple pages

qa-featured

Hello Ace,

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:

<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

// Code you want to write when the connection is established
?>

Thanks.

Related Questions