dodgeitorelse3 Posted January 29, 2018 Share Posted January 29, 2018 Your welcome but please read a couple of the replies prior to yours as this is not the best way to achieve your goal. Quote Link to comment https://forums.phpfreaks.com/topic/306301-checkbox-values/page/2/#findComment-1555850 Share on other sites More sharing options...
NewbieAmi Posted January 30, 2018 Author Share Posted January 30, 2018 ?? Why do you loop thru the query results and place them in an array only to loop thru that array to output them? You could have saved yourself a lot of typing by just outputting the query result elements directly. Hey, i didnt see this post ... well as a newbie i thought it was a "good" practice. Quote Link to comment https://forums.phpfreaks.com/topic/306301-checkbox-values/page/2/#findComment-1555891 Share on other sites More sharing options...
NewbieAmi Posted January 30, 2018 Author Share Posted January 30, 2018 ^^^ if implemented without a lot of extra variables and unnecessary lines of code, this would be a programming practice called 'separation of concerns', which the OP will wish he was using when he finds out how much extra work it will be when using the mysqli extension with prepared queries and wants to switch to the much simpler php PDO extension. if implemented by creating a bunch of extra variables and extra lines of code, it's a programming practice called 'wearing out your keyboard faster' I think i should learn OOP or use PDO. thks for the advice Quote Link to comment https://forums.phpfreaks.com/topic/306301-checkbox-values/page/2/#findComment-1555892 Share on other sites More sharing options...
ginerjm Posted January 31, 2018 Share Posted January 31, 2018 Yes - learn the pdo functions. It will be easy with just a bit of reading and using the examples that are shown in the manual. Use prepared queries too - the ones that use the colon-ized args and not the plain old question mark ones. You should also tackle any kind of programming by stepping back from the keyboard and thinking clearly about what you are going to do. Write it down in steps. Then when you choose how to code it be sure you have READ the manual on each function to be sure you understand what it does and what it produces. If you had done that earlier you would have seen that you were simply moving one array (of query results) into another array. Quote Link to comment https://forums.phpfreaks.com/topic/306301-checkbox-values/page/2/#findComment-1555905 Share on other sites More sharing options...
HemendraSingh Posted January 31, 2018 Share Posted January 31, 2018 you need to create one more table with header tags.. For example: <table> <th>PHP</th> <tr>developer</tr> </table> If you have double post on a single table.Please remove duplicate data from the table. Quote Link to comment https://forums.phpfreaks.com/topic/306301-checkbox-values/page/2/#findComment-1555913 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.