Learning Slag ask PHP to get the value of form form submission

Source: Internet
Author: User
Ask a question, click Add, in another page with the Post method to get the Bigclass value is the last row value, how to get the bank, that is, click once to add the value of the current row. Is it possible to use form?


Reply to discussion (solution)

Because your loop causes the Name property of input to be the same, the following will overwrite the previous one: Change the property name to an array form name= ' bigclass[] ' so that the value of the subclass and the Name property of the Submit button are changed as well

Because your loop causes the Name property of input to be the same, the following will overwrite the previous one: Change the property name to an array form name= ' bigclass[] ' so that the value of the subclass and the Name property of the Submit button are changed as well


Again weak weak ask, this change, how do I get bigclass value, $_post[bigclass] get is an array ...


Because your loop causes the Name property of input to be the same, the following will overwrite the previous one: Change the property name to an array form name= ' bigclass[] ' so that the value of the subclass and the Name property of the Submit button are changed as well


Again weak weak ask, this change, how do I get bigclass value, $_post[bigclass] get is an array ...


Print the array to see that each value should correspond to the value of the button you submit.

Print out is the bigclass of all lines, how to get the bigclass of the row to add,How do you add a sign?

Change name= ' Bigclass ' to Name= ' bigclass[] '
Go to Print_r ($_post[bigclass]) print it out to see

Each row is added with a form, and the value under the current form is taken when you add it.

It is good to identify a sequence in the Name property of the Submit button. For example write Name= "submit[" , so that you can get to click on which button. $key =$_post[' Submit ']; Take out the first element inside the $key $k, then $bigclass=$_post[' Bigclass ' [$k] to get the final result.

It is good to identify a sequence in the Name property of the Submit button. For example write Name= "submit[" , so that you can get to click on which button. $key =$_post[' Submit ']; Take out the first element inside the $key $k, then $bigclass=$_post[' Bigclass ' [$k] to get the final result.

Thank you, finally done!
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.