PHP - Handle POST Form using select options as array -


I have the following formats that have 3 dropdown boxes, each one for each and each has a different 'amount' Which will be selected (i.e. 0-1, 0-2, 0-3). The name for each selection is the same, but I have passed the ID of each of them to create an array.

How can I get results from a posted form?

I should be able to tell which extras is selected with the value of more than 0. So I should be able to tell how many extra [1] have been chosen, how many additional [2]] and so on ...

   & Lt; TD & gt; & Amp; Pound; 9. 9 9 & lt; / Td> & Lt; TD & gt; & Lt; Select name = "spare [1]" & gt; Option value = "0" & ​​gt; 0 & lt; / Options & gt; Option value = "1" & gt; 1 & lt; / Option & gt; & Lt; Option value = "2" & gt; 2 & lt; / Options & gt; & Lt; / Select & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Option 2 & lt; / Td> & Lt; TD & gt; & Amp; Pound; 14.99 & lt; / Td> & Lt; TD & gt; & Lt; Select name = "extras [2]" & gt; & Lt; Option value = "0" & ​​gt; 0 & lt; / Options & gt; Option value = "1" & gt; 1 & lt; / Options & gt; & Lt; / Select & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Option 3 & lt; / Td> & Lt; TD & gt; & Amp; Pound; 24.99 & lt; / Td> & Lt; TD & gt; & Lt; Select name = "spare [3]" & gt; & Lt; Option value = "0" & ​​gt; 0 & lt; / Options & gt; Option value = "1" & gt; 1 & lt; / Option & gt; & Lt; Option value = "2" & gt; 2 & lt; / Option & gt; & Lt; Option value = "3" & gt; 3 & lt; / Options & gt; & Lt; / Select & gt; & Lt; / TD & gt; & Lt; / TR & gt; Bit cut with direct access (used for symphony)   

  // xxx.php // If you wish you can use $ _POST, but I Always used $ _REQUEST $ extra = $ _REQUEST ['extra']; $ Extra1 = $ Extra [1]; $ Extra2 = $ Extra [2]; $ Extra3 = $ Extra [3];    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -