mysql - How to enter php data into a html multiple select box -
I am working on a page that will create a team. I just want to create a selection box which will list all the users of all the users. After that, the user can select more than one friend (i.e. 5) and can send the request to these 5 people to join the team but I am having problems I did this:
Select $ sql = "Select i. *, Join * Connect with M * m.id = i.clique_id where adder_id =: id"; $ Stmt = $ db- & gt; Query ($ sql, array ('id' = & gt; $ _SESSION ['id'])); While ($ record = $ stmt-> fetch ()) {$ surname = $ record ['surname']; }
and this:
& lt; Select multiple = "true" name = "category" well id = "category" name = "category" category = "" & gt; & Lt; Option value = "& lt ;? php echo $ surname ;? & gt;" & Gt; & Lt ;? Php ek $ nickname; ? & Gt; & Lt; / Options & gt; & Lt; / Select & gt;
But only a friend's nickname has been entered in the box. I have to make all friends in the selected box and when I select friends and click on 'Submit Request', I can easily enter the 'team members' table.
Please remember what I am doing?
You should do this:
$ select = '& lt ; Multiple = "true" id = "category" name = "category" & gt; '; While ($ record = $ stmt-> fetch ()) {$ surname = $ record ['surname']; Select $. = '& Lt; Option value = "'. $ Nickname." "Gt;' $ Nickname '& Lt; / Option & gt; '; } Select $. = '& Lt; / Select & gt; '; Select counter $;
Comments
Post a Comment