Hi
I m using form like below
[HTML]<form action='' method = post>
<input type=text name=txt id=txt>
<select name=region id=region multiple>
<option value=1>ONE</option>
<option value=2>Two</option>
<option value=3>Three</option>
<option value=4>Four</option>
</select>
<input type=checkbox name=chkbox value=1>One
<input type=checkbox name=chkbox value=2>Two
<input type=checkbox name=chkbox value=3>Three
<input type=checkbox name=chkbox value=4>Four
<input type=submit name=summit value=Enter>
</form>[/HTML]
and I use the following code to get the values
[PHP]
echo "Text Field value = ". $_POST['txt'] . "<br>";
echo "Select Field values=".$_POST['region']. "<br>";
echo "Checkbox Field values=".$_POST['chkbox']. "<br>";
[/PHP]
Let I enter Hello in Text field, select One and Two from select field and Check Three and Four Check Boxes then the above PHP code show the following results
Text Field value=Hello
Select Field values=2
Checkbox Field values=4
where as I expect the follwoing
Text Field value=Hello
Select Field values=1,2
Checkbox Field values=3,4
Looking forword for Help
Thanks in advance
I m using form like below
[HTML]<form action='' method = post>
<input type=text name=txt id=txt>
<select name=region id=region multiple>
<option value=1>ONE</option>
<option value=2>Two</option>
<option value=3>Three</option>
<option value=4>Four</option>
</select>
<input type=checkbox name=chkbox value=1>One
<input type=checkbox name=chkbox value=2>Two
<input type=checkbox name=chkbox value=3>Three
<input type=checkbox name=chkbox value=4>Four
<input type=submit name=summit value=Enter>
</form>[/HTML]
and I use the following code to get the values
[PHP]
echo "Text Field value = ". $_POST['txt'] . "<br>";
echo "Select Field values=".$_POST['region']. "<br>";
echo "Checkbox Field values=".$_POST['chkbox']. "<br>";
[/PHP]
Let I enter Hello in Text field, select One and Two from select field and Check Three and Four Check Boxes then the above PHP code show the following results
Text Field value=Hello
Select Field values=2
Checkbox Field values=4
where as I expect the follwoing
Text Field value=Hello
Select Field values=1,2
Checkbox Field values=3,4
Looking forword for Help
Thanks in advance
Comment