I insert multiple id from my checkbox to MySQL database using php post form. In example I insert id
(checkbox value table test
) to mysql. Now I need a function to retrieve data from MySQL and print to my page with my example output (print horizontal list name of table test
where data = userid)
My checkbox value (table name is test
):
id | name
----+-------
1 | test1
2 | test2
3 | test3
4 | test4
5 | test5
6 | test6
7 | test7
9 | test9
MySQL data insert (name of table usertest
):
id | data | userid
----+---------+--------
1 | 1:4:6:9 | 2
2 | 1:2:3:4 | 5
3 | 1:2 | 7
Example outout :( print horizontal list name of table test where data = userid )
user id 2 choise : test1 - test4 - test6 - test9
Thanks