how to get post element in form in this case( in PHP ) -


In a form that is controlled by php language, how can we get an input element which is 1 Like in the array, item 2, item 3 ..... (if we only want the same items which are worth)

  Example: - & lt; Form method = "post" action = "& lt; php echo $ PHP_SELF ;? & gt;" & gt; Item 1 & lt; Input type = "text" name = "item 1" & gt; Item2 & lt; Input type = "text" name = "item2" & gt; Item 3 & lt; Input type = "article" name = "item 3" & gt; & Lt; Input type = "submit" value = "submit" name = "submit" & gt; & Lt; / Form & gt;  

  & lt; Form method = "post" action = "& lt;? Php echo $ PHP_SELF ;? & gt;" & gt; Item 1 & lt; Input type = "text" name = "item []" & gt; Item 2 & lt; Input type = "text" name = "item []" & gt; Item 3 & lt; Input type = "text" name = "item []" & gt; & Lt; Input type = "submit" value = "submit" name = "submit" & gt; & Lt; / Form & gt;  

then in php

  $ inputarray = $ _REQUEST ['item']; Echo $ inputra ray [0];  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -