Starting with fresh, minimal install of Centos 6 Linux: yum -y upgrade Apache: yum -y install httpd service httpd start chkconfig httpd on lokkit -q -p 80:tcp yum -y install lynx lynx localhost vi /var/www/html/index.html lynx localhost MySQL: yum -y install mysql mysql-server chkconfig mysqld on service mysqld start mysqladmin -u root password 'TopSecret' mysqladmin -u root -h `hostname -f` password 'TopSecret' mysql mysql -p cat >> ~/.my.cnf < MyDbName.sql mysqladmin create MyDbName mysql MyDbName < MyDbName.sql PHP: yum -y install php php-mysql echo "" > phpinfo.php lynx localhost/phpinfo.php service httpd restart lynx localhost/phpinfo.php :::::::::::::: add.php :::::::::::::: MyDb

Add an Entry to MyDb

Add a name and notes entry to MyDb.
Name:
Notes:

:::::::::::::: delete.php :::::::::::::: :::::::::::::: display.php :::::::::::::: MyDb

Search MyDb

Enter some search strings, or leave a field blank to see all records.
Name:
Notes:
num_rows == 0) { echo ""; } else { while ($row = $results->fetch_assoc()) { echo ""; } } ?>
NameNotes
No matches
{$row['Name']}{$row['Notes']}

:::::::::::::: options.php :::::::::::::: connect_errno) { die ("

There is a problem with the database: " . $mysqli->connect_error); exit; } if (!$results = $db->query($sql)){ die ("

There is a problem with the query: " . $db->error); exit; } ?> :::::::::::::: phpinfo.php :::::::::::::: :::::::::::::: review.php :::::::::::::: MyDb

Edit a Record in MyDb

Select a record to edit or delete. fetch_assoc()) { $id="$row[ID]"; $name="$row[Name]"; $notes="$row[Notes]"; echo ""; echo ""; echo ""; echo ""; } ?>
NameNotesEditDelete
$name$notes"; echo ""; echo "
"; echo ""; echo "

:::::::::::::: update.php :::::::::::::: Edit the MyDb Records"; echo "

Update record # $id

"; $sql = "select ID, Name, Notes from MyTable where ID=\"$id\";"; include ("options.php"); while ($row = $results->fetch_assoc()) { $id="$row[ID]"; $name="$row[Name]"; $notes="$row[Notes]"; echo "
"; echo ""; echo "Name: "; echo "Notes: "; echo "
"; } echo ""; } else if ($submit == "Update") { $sql="update MyTable set Name=\"$name\", Notes=\"$notes\" where ID=\"$id\";"; include ("options.php"); echo "Edit the MyDb Records"; echo ""; echo ""; } else { echo "Edit the MyDb Records"; echo ""; echo "What? Returning to start page..."; } ?>