hi,
when the user selects more than one from a list box,i want to store all the values in the db table.
i want the user to select only five,if more than five are selected it should display message
thanks
queenc
-1
Junior Poster
Recommended Answers
Jump to Postif you have 5 colunms in db setup then forget for loop just input results as $mylist[0], $mylist[1], etc
if you have one field use implode(',',$mylist)<?php $mylist=$_POST['mylist']; if(count($mylist)>0 and count($mylist)<=5) {echo 'do db thing here'; print_r($mylist);} else {echo 'u must select 1, but no more than …
All 4 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.