Possible id value during loop output

Source: Internet
Author: User
During cyclic output, the id value may be in the process of creating an administrator page. this is the content output by foreach. how to make each message have its own id & nbsp; after clicking delete & nbsp; in the background, how can I transmit the id value & nbsp; how can I write code ?, How do I submit a form? Is each form left with one message or all messages with one form? The id value of each loop output.

An administrator page is being created. this is the content output by foreach. how can I make each message have its own id and delete it in the background? how can I transmit the id value? how can I write code?
------ Solution --------------------
How do I submit a form? Is each form left with one message or all messages with one form? Add a hidden field to each form, and the content is the message ID. for all forms, add a CLICK event to the Modify button, the parameter used to click the event function is the ID, and the JS code is submitted by yourself.
------ Solution --------------------
Reference:
Reference: in spshanchu. php
Echo $ _ GET ['id'];
Check whether the corresponding ID can be output. if not, I think you know what to do!
There is something called short open tag.

Thank you!
------ Solution --------------------
Button event onclick = window. location = "index. php? Action = update & id = {$ id }"
------ Solution --------------------
First understand static.
In index.html:
Put it in script: function myDelete (id) {location. href = "spshanchu. php? Id = "+ id ;}
In spshanchu. php:
Run the "index.html" button and try to modify the code.

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.