<Select> data transmission problems

Source: Internet
Author: User
&Lt;select&gt;data transmission question inquire.html & lt; html & gt; & lt; head & gt; & nbsp; & lt; title & gt; inquiretheclassroom & lt;/title & gt; & lt; /head & gt; & lt; body & Data transmission problemsInquire.htmlInquire the classroomCRMS-Inquire the classroomInquire_classroom.phpInquire the classroomCRMS-Inquire the classroom // Create short variable names$ Lesson_id = $ _ POST ['lesson _ id'];$ Con = mysql_connect ("localhost", "root ","");// Establish a connection through the server locahost. the user name is root and no password is required.If (! $ Con){Die ('could not connect: '. mysql_error ());} // If it fails, an error is displayed.Mysql_select_db ("crms", $ con); // select a databaseIf (! Mysql_select_db ("crms", $ con) die (mysql_error ());$ Search_lesson_id = "SELECT * FROM use2 WHERE lesson_id = '{$ lesson_id }'";$ Result = mysql_query ($ search_lesson_id, $ con );If (! $ Result){Die ("The lesson does not exist .");}While ($ row = mysql_fetch_array ($ result )){Echo $ row ['cno'];Echo $ row ['CID'];Echo"";}Mysql_close ($ con );?>After a value is selected in the drop-down box and submittedNotice: Undefined index: lesson_id in D: \ xampp \ htdocs \ inquire_classroom.php on line 9D301001 error. But hereHave I already defined it?


------ Solution --------------------
$ Lesson_id = $ _ POST ['lesson _ id']; this is actually OK.
Modify the error severity of php. ini:
Error_reporting = E_ALL &~ E_NOTICE

Restart apache after modification.
------ Solution --------------------
Notice is not an error and does not affect the result.
If notice is not displayed, modify the error prompt level in php. ini.

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.