Re: Can this work?

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

 



2013/7/5 Stuart Dallas <stuart@xxxxxxxx>

> On 5 Jul 2013, at 14:56, Karl-Arne Gjersøyen <karlarneg@xxxxxxxxx> wrote:
>
> > Hello. I have a form in HTML/PHP with for loops that generate a selected
> > list like this:
> > for($i = 1; $i< 25;$i++ ){
> > <option value="<?php echo "$i"; ?><?php echo "$i"; ?></option>
> > }
> >
> > The lists look like this:
> >
> > <form action="index.php
> > <view-source:http://localhost/%7Ekarl/kasen/io/kp/index.php>"
> > method="post"><select name="valgt_dynamit_polse_1-25kg"><option
> > value="1-25" selected="selected">1-25</option><option
> > value="1">1</option><option value="2">2</option><option
> > value="3">3</option><option value="4">4</option><option
> > value="5">5</option><option value="6">6</option><option
> > value="7">7</option><option value="8">8</option><option
> > value="9">9</option><option value="10">10</option><option
> > value="11">11</option><option value="12">12</option><option
> > value="13">13</option><option value="14">14</option><option
> > value="15">15</option><option value="16">16</option><option
> > value="17">17</option><option value="18">18</option><option
> > value="19">19</option><option value="20">20</option><option
> > value="21">21</option><option value="22">22</option><option
> > value="23">23</option><option value="24">24</option><option
> > value="25">25</option></select> Kg&nbsp;<select
> > name="valgt_dynamit_polse_26-50kg"><option value="26-50"
> > selected="selected">26-50</option><option
> > value="26">26</option><option value="27">27</option><option
> > value="28">28</option><option value="29">29</option><option
> > value="30">30</option><option value="31">31</option><option
> > value="32">32</option><option value="33">33</option><option
> > value="34">34</option><option value="35">35</option><option
> > value="36">36</option><option value="37">37</option><option
> > value="38">38</option><option value="39">39</option><option
> > value="40">40</option><option value="41">41</option><option
> > value="42">42</option><option value="43">43</option><option
> > value="44">44</option><option value="45">45</option><option
> > value="46">46</option><option value="47">47</option><option
> > value="48">48</option><option value="49">49</option><option
> > value="50">50</option></select> Kg&nbsp;
> >
> > What I try to do with it is to register the selected value and do
> something
> > with it. The lists is weight in KG. I hope to select only one value
> between
> > 1-25kg OR 26-50kg. I don't know if this is possible? What do you think?
>
> If the range of acceptable values is 1-50, why do you have two select
> fields instead of one?


The select list has values between 1 and 200. Therefore I split it up for
every 25th value.

Karl

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux