POST and GET problems
This is the code. $ id cannot be output in the next two if statements. what is the problem and how to solve it.
Reply to discussion (solution)
If (isset ($ _ POST ['submit ']) are you using GET or POST?
Get used in the previous link, and fill in the post value in the database
If the id is passed only in the link, will there be no id in the post form?
If the id is passed only in the link, will there be no id in the post form?
Yes, no id is required for post, and no id is required for the form.
This is a webpage for modifying news.
This is the previous page. click modify to upload an id.
Go to the second page and read the content by passing the id to display it for easy re-editing.
Then this commit uses POST and attaches all the source code.
No id is passed in the form? So how do you know who has been modified?
No id is passed in the form? So how do you know who has been modified?
26 rows, id is queried in the database in the form of a variable
What's wrong with you?
You have test code on your own. why is the id value not printed when the form is submitted?
What's wrong with you?
You have test code on your own. why is the id value not printed when the form is submitted?
What's wrong with you?
You have test code on your own. why is the id value not printed when the form is submitted?
I mean The tag does not have the function of writing IDs to the database. the IDs are obtained from the previous page through get and saved in $ id.
12 lines can be echo,
After you click submit, the output in lines 16 and 25 is empty.
On the modify and edit page, place the value of the get id in a hidden form and submit it together. Do not use global;