Cainiao asked for help. php edited and previewed a piece of news in the background, and could not get the ID. This post was last edited by lovejing2008 from 2014-07-12:06:11 for beginners. php & nbsp ;, I tried to make a small news example. when editing or previewing a news item in the background, I couldn't get the corresponding content because I couldn't pass the id, please take a look at the Cainiao website where you can preview and edit your mouse. php will edit and preview a piece of news in the background, and you will not be able to obtain the ID.
This post was last edited by lovejing2008 at 17:06:11
I am a beginner in php. I tried to provide a small news example. when I edit or preview a news article in the background, the id cannot be passed in and the corresponding content cannot be obtained. please help me to see it.
Place the cursor in preview and edit. the displayed address is xxxx/admin/news. php? Id =
News. php page
News. php page
$ Id = $ _ GET ["id"];
If ($ _ POST ["content_id"])
{
$ Content_id = $ _ GET ["content_id"];
$ Class = ($ _ POST ["class"]);
$ Classdate = ($ _ POST ["classdate"]);
$ Teacher = ($ _ POST ["teacher"]);
}
$ SQL = "select * from fk_content where content_id = $ id ";
$ Rs = mysql_query ($ SQL );
$ Rows = mysql_fetch_assoc ($ rs );
?>
List. php page
Target = "_ blank"> Browse
Database field
I 'd like to ask your teachers for help,
------ Solution --------------------
The sentence is changed:
"Target =" _ blank "> Browse
In addition, print_r ($ rows); to see what the result is.
------ Solution --------------------
------ Solution --------------------
Id =" Close
------ Solution --------------------
Target = "_ blank"> Browse
Missing"
------ Solution --------------------
Color Labels cannot be added in the original PHP format:
"Target =" _ blank "> Browse
The red part should be enclosed in quotation marks. The basic HTML knowledge is ....