After the action attribute in form? The passed parameter cannot be obtained. formaction
1 $ p_id = $ _ REQUEST ['P _ id']; 2 3 echo "
The above code uploads the $ p_id obtained on this page to the next page when you click button to submit to jump to updateproduct. do. php. However, each time you click a button, only" Updateproduct. do. php? P_name = 11 & p_price = 22 & p_pic = 33 & p_date = 44 & p_detail = 55"
P_id cannot be passed. After a long time, the reason is actually very simple. (The following is my understanding, but the problem is solved.) In method = get, form only receives the "name" attribute and corresponding "value" of the form element. Do you want to write by yourself in the action? To pass the value, the value of method must be = post, that is, the second line in the Code is changed:
<form action='updateproduct.do.php?p_id=$p_id' method='post'>
Change it to this!
Many of the above statements are not standardized and may not be rigorous. please correct me!
END