Hi all,

I have a table with multiple apps listed on it. The table is auto populated with the all available apps. The admin then has a options to assign user permissions e.g. user, admin or none. I have attached a pic of my table.

I wanted to know how to save these individual permissions to my user access table. I have two tables as shown below.

table 1 - app [app_id, app_name .... more]
table 2 - user_access [ id, user_id, app_id, lastlogin, expiry, user_level]

The code for my populating my table is within a while loop is shown below.

$app_level = $row['app_level'];
<tr class="mouse_hover">


<td align="center"><input type="radio" name="<?=$app_id?>" value="2" <?php if($app_level==3){echo 'checked="checked"';}?>></td>

<td align="center"><input type="radio" name="<?=$app_id?>" value="1" <?php if($app_level==2){echo 'checked="checked"';}?>></td>

<td align="center"><input type="radio" name="<?=$app_id?>" value="0" <?php if($app_level==1 || empty($app_level)){echo 'checked="checked"';}?>></td>


I will be saving my results by posting to another .php. I guessing I have to save the results with a array, but if i do that how would i save them using a mysql_query.

I dont know where o start!!!

If anyone can help or point me in the right direction, will be much appriciated.

Thanks in advance.

Attachments table.jpg 25.13 KB
7 Years
Discussion Span
Last Post by MagicMedia
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.