开发者

radio value lost by $_post array

I have this simple form:

<form method="post" action="?step=2">   
<label>A4 - Colour / Colour 
开发者_运维知识库<input type="radio" name="leaflet" value="1"></label><br>   
<label>A5 - Colour / Black 
<input type="radio" name="leaflet" value="2"></label><br>
<input type="submit" name="leaflet" value="Select">
</form>

When I apply print_r ($_POST); to the submission though, I only get the submit button data. I don't even see the radio name.

What could do that?


PHP's standard form parsing system (which populates $_POST) can't handle multiple bits of form data with the same name (unless that name ends with the characters []).

Change the name of the submit button.


Buddy you have same name for submit button and radio button :)

ie leaflet

The value get overridden. I HOPE u got it

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜