For beginners, php edits and previews a news article in the background, and cannot obtain an ID.

Source: Internet
Author: User
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 ....

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.