Add a table and field to your database that will represent the status. For example, if you want to have a website that will show whether your store is open or closed, you might add the field "status" to the "stores" table in your database.
Embed a request to connect to your database server in the online status indicator website. Use the syntax of your programming language of choice. For example, in PHP the code looks like: "<?php $link = mysql_connect('localhost','mysql_user','mysql_password')," without the quotation marks.
Pull the "status" field from your database. Follow the syntax of your programming language and database query language to access your database. For example, using PHP to pull from a MySQL server looks like: "$result = mysql_query('SELECT status FROM database.stores')," without the quotation marks.
Print the result of the database query on the webpage. In PHP the code looks like: "echo mysql_result($result)," without quotation marks.
Follow the syntax and commands of your programming language to close the connection with the database server and wrap up all open-ended code. For example, the PHP code would conclude with: "mysql_close($link); ?>" without quotation marks.