php - How to add users from column 1 to column 2 using codeigniter? -


how add users column 1 column 2 using codeigniter?

column 1 has usernames , column 2 blank lines


|-----|--------|------------| |users|        |moderators  | |-----|--------|------------| |mark |        |____________| |john |        |____________| |xyz  |        |____________| |abc  |->add   |____________| |you  |->remove|____________| |me   |->undo  |____________| |him  |        |____________| |we   |        |____________| |123  |        |____________| |321  |        |____________| |-----|--------|------------|         save option  

there 2 columns, column 1 has users on , column 2 moderators. if admin selects 1 of user clicks on add user must in column 2

since reputation low cannot post images...so posting real time example. (screenshot)

any tutorial on please? thank you

make left side like

<select name="users" multiple>   <option value="mark">mark</option>   <option value="john">john</option>   <option value="zyx">xyz</option>   <option value="abc">abc</option> </select> 

you can use form submit , insert selected in moderator table , fetch , display moderator users in page

if want without page reload use java script show selected value in moderator col

here live soln http://jsfiddle.net/asvignesh/rmgqq/


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -