Web forms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am creating some web based functions for the staff and volunteers to
use.  Access to these functions is designated by those who need it.

I have two tables.  

One table describes the component --- It has a component reference
number column.  

The second table indicates who has access to what --- containing the
component reference number from the component table (described above)
and also the member reference number.  

Essentially if you are logged in your reference number is in a session
variable and using PHP & mySQL the script is checking to see which
components to allow you access to in your menu and only displaying those
menu options.

So far I have been updating this table using phpmyadmin.  I have begun
writing a script to do this in a more smooth fashion.

The script I am writing produces a form in a table.

Column 1 shows the component name.  Column 2 is a check box for the user
to check in if the person whose permissions are being modified should
have access to this component.  I have named the check box the component
reference number --- 1 for example.  There are about 16 components are
growing.  

I am not sure how to check if "$1 = on" indicating the check box was
checked in.  I know you would use an IF ( ) { } statement --- but I want
to automate this so when new components are added in I want have to
modify the script which actually updates who has access to what
component.

What I have done so far is selected all the components and started a
WHILE loop --- $i will go from 0 to 15 so I am able to look at each
check box to see if it was selected or not and then I am going to use
the INSERT INTO or DELETE commands to update the table, etc.

How can I find out if $1 and $2 and $3 and ... $15 are "on"?

Ron

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux