Home > MySQL, PHP > Php Script For Mysql Data

Php Script For Mysql Data

October 20th, 2009

I need a PHP script to maintain a simple MySQL DB.

The DB consists of a name field and six fields containing a “1″ or “0″.

I need a text form to add either more names by themselves and or change names already in the DB and set one of the other six fields to a “1″ using six radio buttons.
If a name is already in the DB, then only one of the six fields will be updated based on which radio button is selected.

I need to generate reports of names based on which of seven radio buttons are selected. One radio button is for a list of names with all six fields containing a “0″.
The other six radio buttons look for a “1″ in one of the six fields. If more than one of the six radio buttons are selected then it will act as an AND statement and display names that have a “1″ in all the fields selected.

I also need a lookup search form that displays all the names searched found in the DB along with sortable columns for the name and other six fields.

Sample DB:

Name Field1 Field2 Field3 Field4 Field5 Field6
John 1 0 1 0 0 1
Ed 0 1 0 1 0 0
Sally 0 0 0 0 0 0
Randy 0 0 1 0 0 1
Lisa 0 1 0 1 0 0

Selecting Field2 and Field4 radio buttons for a report would result in:

Ed
Lisa

I can provide SSH access to my CentOS Linux server to do your programming.


Php Script For Mysql Data

Categories: MySQL, PHP Tags: , , , , , ,
Comments are closed.
Bear