Re: how to get value from checkbox's variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can use array


<form action="view.php" method="POST">
<input type="checkbox" name="hoby[]" value="Sleeping">Sleeping<br>
<input type="checkbox" name="hoby[]" value="Eating">Eating<br>
<input type="checkbox" name="hoby[]" value="Working">Working<br>
<input type="checkbox" name="hoby[]" value="Walking">Walking<br>
<input type="submit" name="submit" value="Send">

On Nov 21, 2007 6:41 PM, abhijit murade <abhijitmurade@xxxxxxxxx> wrote:

>   hi,
>
> you have give same name to all checkboxes so it giving only one value at
> submit
> just give seperate name to all check boxes and u can access these value
> easily
>
> just print the array $_POST.....................
>
>
> On 11/21/07, Angga Sanjaya <fux_2005@xxxxxxxxx <fux_2005%40yahoo.com>>
> wrote:
> >
> > hi All...before sory for my bad english
> > i have a HTML code with checkbox input,this is my full code :
> > <form action="view.php" method="POST">
> > <input type="checkbox" name="hoby" value="Sleeping">Sleeping<br>
> > <input type="checkbox" name="hoby" value="Eating">Eating<br>
> > <input type="checkbox" name="hoby" value="Working">Working<br>
> > <input type="checkbox" name="hoby" value="Walking">Walking<br>
> > <input type="submit" name="submit" value="Send">
> > how i get the value from that checkbox with format
> item1,item2,item3,item4
> > with PHP code,example :
> > user select All hobies in that form so the output is "My hobies is
> > Sleeping,Eating,Working,Walking" or if user only select sleeping and
> > walking, the output is "My hobies is Sleeping,Walking".
> > My friends suggest me to use implode function but i don't know how to
> use
> > that.
> > thanx before for your respon and answer.
> >
> > ^quick-sniffer^
> >
> >
> > __________________________________________________________
> > Get easy, one-click access to your favorites.
> > Make Yahoo! your homepage.
> > http://www.yahoo.com/r/hs
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
> --
> Thanks & Regards,
>
> [Non-text portions of this message have been removed]
>
>  
>



-- 
MD.Dixon
dixonmd@xxxxxxxxx
+919895725804
+919744029219


[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux