$ I contains 10 messages,
Click any image and print it to the B page through $ _ SESSION.
How can I select the image to be clicked and print the ID of the image? session: ">
------ Solution --------------------
If you only want to GET the image ID, you can pass the parameter through the GET method, instead of the SESSION. The SESSION is on the server side. you click the image on the client side, the server cannot know which image you click or change the SESSION by clicking the object, unless you pass the parameter.
Write it like this.
Id = ">
Page B:
Echo $ _ GET ['id'];
------ Solution --------------------
$ _ SESSION [$ I [id] = $ I [id];?>
">
. Jpg "/>
B. php
Session_start ();
$ Id = $ _ GET ['id'];
Echo $ _ SESSION [$ id];
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.