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.