-
Step 1
Register a domain name for your Web site ("google.com" or "ehow.com," for example) from a domain registrar such as GoDaddy or BlueHost.
-
Step 2
Buy a hosting plan. Most domain name registrars (including the two listed above) offer hosting plans as well. Though they come with many different features, make sure you buy one that comes with numerous MySQL databases. MySQL is a popular database management system, installed on your server, that you'll use to store your databases.
-
Step 3
Log into your Web site's control panel provided to you by your host. Select the "MySQL" or "Databases" section, and then select the "Add a Database" or "Create New Database" option. This will involve choosing a name for your database and a username and password to access it. On some hosts, the database name and username are the same. Keep this information handy.
-
Step 4
Click on your database or select the "Edit Database" option. The vast majority of hosts use a program called phpMyAdmin to manage your databases. This program provides a graphical interface to handle your databases, allowing you to manage them without using SQL code, the database programming language. It can be complicated at first, so browse around until you have a handle on the layout.
-
Step 5
Learn SQL code. While phpMyAdmin means you don't have to be an SQL expert, you still need to know how to write basic commands because that's how you put database information in your Web site's files. SQL isn't hard to get a handle on and many tutorials exist on the web. The most comprehensive is W3Schools.
-
Step 6
Connect to the databases through PHP files. Think of PHP as like the middle man between basic HTML and your databases. PHP files are simply HTML files with a ".php" extension that can contain extra commands for tasks that HTML can't accomplish. All of these extra commands must start with "<?php" and end with "?>". You'll need to read up on PHP to get a handle on it, but here's the code to make a simple database connection:
<?php
$conn = mysql_connect("servername", "username", "password");
mysql_select_db("databasename");
?> -
Step 7
Grab the database information by creating an SQL query, sending it to the database, and storing the results into variables that you can display on pages. The following example will list all the names and values of every field inside a table in your database called "table":
<?php
$sql = "SELECT * FROM table";
$result = mysql_query($sql, $conn) or die(mysql_error());
while ($row = mysql_fetch_assoc($result)){;
foreach ($row as $name => $value){
print "$name: $value<br />";
} } ?>
As you can see, writing database coding can get technical very quickly. While this is a look under the hood, rest assured that most people don't program this all on their own--instead, they use a content management system to do most of the coding work for them. A CMS is a program that you install on your server that does most of the coding work for you, allowing you to manage your site's information through a user interface. Joomla! is an example of a free and popular database-driven CMS.












Comments
shenderuk1986 said
on 7/20/2009 Hello, People,
please, consider using MyTaskHelper.com
Just want to let you know about new one Free Online Database Application, main benefits and features:
- you can create complex web-forms
- you can put this forms to your site, using Widget Builder menu
- you can create file/image/video databases
- again you can embed Widget-form for adding some records to your site, and another widget for integrating your collected data
- you can add validations, to be sure your users add proper data, for example Email validation, uniqueness etc
for example – you can create form for bug-trucking, with task name/priority, attach screenshot, dates etc,
put it into your site – and you have bug-trucking system for free!
Please, see more on about page.
- And it’s all for FREE