mail us  |  mail this page

contact us
training  | 
tech stuff  | 

Tech Stuff - PHP SQL Web Viewer

We could not find a simple MySQL web based database viewer. There must be hundreds we thought. Perhaps we looked in the wrong places. Perhaps it's too trivial a requirement. This was put together in a few minutes to list tables in a database, view the data from a defined table and optionally view table structure. It may be useful as a starting point - if so you are welcome. We may expand it to let us repair and fix up tables using the same techniques or add a WHERE clause or.....

Health-Warning: This is made available at your risk, we make no warranty that the code has no bugs in it or that it will even do what we think or say or even say what we think it will. Like all downloaded software we urge caution if you use it.

Web Based MySQL Viewer

We use a simple form based interface shown below. We have disabled the send button in this one but it has a commented-out line that you would change to reflect wherever you run your php scripts from or see minimal HTML version or right click and 'save link target as' - Oh the choices.

MySQL Web Viewer

Displays table data from a MySQL database. You need either a specific MySQL username and password for the database or the root username and password. We recommend the former. If host name is blank 'localhost' is assumed. If the table name is blank it will list all the tables in the specified database. If the database is blank it will give errors! The radio button is used to control whether you want to display the table data or the table structure. Do not use the data button for mega big files - it should work but you will get rather a lot of data - like, all of it! - alternatively, you could add a WHERE clause fired from the form to be more selective. The structure button is OK for mega files.

The first field of each new record is marked in bold, tables are displayed three columns across and data is split at 30 bytes on each line with no regard to spaces. Table structures are displayed in the standard 5 columns with no regard to the page width. There is no error recovery or any smart stuff. You get anything wrong - you get errors.

database name:
table name:
host name:
user Password
Data Structure

PHP Module

The PHP is pretty gruesome but simple and does the job. Works on PHP3 and PHP4 and should work on PHP5 since it uses no deprecated mysql PHP features. Right Click and 'save link target as' to a suitable place and rename with .php suffix or whatever your server uses or just cut and paste the body code into another formatted page. Few if any comments - so what's new.

Problems, comments, suggestions, corrections (including broken links) or something to add? Please take the time from a busy life to 'mail us' (at top of screen), the webmaster (below) or info-support at zytrax. You will have a warm inner glow for the rest of the day.

Tech Stuff

RSS Feed Icon

If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C standards compliant browser such as Firefox




Icons made by Icomoon from is licensed by CC 3.0 BY
share page via facebook tweet this page


email us Send to a friend feature print this page Display full width page Decrease font size Increase font size


HTML Stuff

W3C HTML 4.01
HTML5 Reference
W3C Page Validator

CSS Stuff

W3C CSS2.1
W3C CSS2.2
Default Styles
CSS3 Selectors
CSS 3 Media Queries
CSS 3 Colors

DOM Stuff

W3C DOM 3 Core
W3C 3 Events

Web Style Guide

Useful Stuff

Peter-Paul Koch
A List Apart
Eric Meyer on CSS

Our Stuff

Our DOM Pages
DOM Navigation
Liquid Layout
CSS Short Cuts
CSS overview
CSS One Page

Javascript Stuff



CSS Technology SPF Record Conformant Domain
Copyright © 1994 - 2024 ZyTrax, Inc.
All rights reserved. Legal and Privacy
site by zytrax
hosted by
web-master at zytrax
Page modified: January 20 2022.