PHP and MySQL are one of the most used technologies on the web today. By using about 7 different script files we can add, update, and delete rows from a MySQL table.
Example of completed project:

Download the Simple PHP MySQL Table Editor.
Lets get started. I will explain each section of the script files so you have an understanding of how it works. You can download the project in a zip file above. The download also includes the example MySQL schema structure so you can test the script right away.
All examples in this post assume that you have already typed the php opening and closing tags. I cannot inlcude them on my page due to Wordpress plugins that I am running.
ALSO, because my PHP color coder sometimes runs off the page, you may have to click “show plain code” to view all typed PHP code.
HEADER.PHP:
Header.php stores the HTML header that include the title, etc. I am not going into detail since this is not a HTML tutorial.
I always start my PHP files with comments to indicate the purpose of the script and give contact details in case anyone has questions. Comments in PHP are indicated with ‘//’ for single lines and ‘/*’, ‘*/’ for multiple line comments:
Read the rest of this entry …
MySQL is an excellent open source database system. Replication is a great way to keep data redundant in case of a server crash. However, replication should not take the place of backups in case of data corruption or mis-entered data - as this data will also be replicated to the slave.
MySQL replication takes place in a master-slave configuration. Be aware that by using the configuration - only changes made on the master are replicated to the slave. Any changes on the slave will not be replicated to the master.
Following the steps below, you can have MySQL replication setup in no time at all.
Source: MySQL Dev Site
Read the rest of this entry …

There might be many reasons why you may be storing data in a database. As Google has showed us, searching data is an invaluable tool that can help minimize the time that it takes to find the information you need.
I would like to show you how you can build your own PHP search engine to find the information you seek in a MySQL database.
First you will need a LAMP to work from. For Windows users a quick and dirty way is to download and install XAMPP. For Linux users try searching Google for a tutorial.
OK, now we will skip to the part where you have a working LAMP install and a database that needs searching from a web interface. I will assume that you have basic knowledge of and where to put your PHP files and also some basic SQL query syntax.
NOTE: I am not including “<?php” at the beginning of documents, nor “?>” at the end I will assume that you will know that these are the operators to signify php code within a file. You may also download the zip file that contains all of the code examples listed below at the end of this document.
Step 1: We are going to create a config.php file with our database information. Please fill in the correct information for your MySQL database and save the file:
$dbhost='127.0.0.1';
$dbusername='db_username';
$dbuserpass='db_password';
$dbname = 'db_name';
-
$dbhost=‘127.0.0.1′;
-
$dbusername=‘db_username’;
-
$dbuserpass=‘db_password’;
-
$dbname = ‘db_name’;
Read the rest of this entry …
I recently replaced our RADIUS authentication system with FreeRadius and MySQL for the database back end. It works better than any Windows RADIUS system that I have experienced (and it’s FREE AS IN BEER).
Also, I am using this in conjuction with the new ASN ARA web interface. It works well for viewing accounting information and users online. It is in beta stage, so you may have to do a bit of hacking to get it to your liking.
Attached are my FreeRadius Config and DB structure. I hope they will help anyone that is trying to setup their own FreeRadius/MySQL server. I am currently running FreeRadius v1.1.3 with the default FreeRadius install on openSUSE 10.2.
Read the rest of this entry …

IPPlan is an open source PHP/MySQL solution for keeping up with IP subnets and is great for system admins. It is better than any paid solution I could find. Managing over 9,000 IP addresses would be close to impossible without it. The program has much more than I could ever use it for including:
Read the rest of this entry …