One curly braces missing

Source: Internet
Author: User
I only know that my code is missing a curly braces} but I don't know where to fill it out. The result I want is that the student ID can be displayed normally after I enter the student ID. if necessary, I can put curly braces in any place and then run the result.
 Enter your student ID!

"; Echo" "; Exit ;}$ query =" select * from $ student_table where xuehao = '$ xuehao' "; mysql_query (" set names GB2312 "); $ result = mysql_query ($ query); $ row = mysql_fetch_array ($ result); if ($ row = 0) {echo"

You have not registered, or your input is incorrect. please enter it again!

"; Echo" "; Exit ;}$ query =" select id as sm from $ student_table where xuehao = '$ xuehao' "; mysql_query (" set names 'gb2312 '"); $ result = mysql_query ($ query); $ row = mysql_fetch_array ($ result); if ($ row [sm] = 0) {echo"

You have not selected a topic. Please select a topic!

"; Echo" "; Exit ;}?> ";} Else {echo" ";} Echo" "; $ N ++ ;}?>

Student ID

Student Name

Topic Name

Instructor

Title

". $ Row ['xuehao']."

". $ Row ['name']."

". $ Row ['subobject']."

". $ Row ['teacher']."

". $ Row ['zhicheng']."


Reply to discussion (solution)

At least the code you posted has no problem!

At least the code you posted has no problem! I add the curly braces to the 10th rows, and its display is like this.

At least the code you posted has no problem!

At least the code you posted has no problem! I add} to row 21st, and its display is like this.

However, no syntax error is reported for your code here!
Of course, it is impossible for me to execute relevant code without your database environment
However, "you have not selected a subject. please choose a topic !" Always executable

} In 32 rows, the display is as follows:

I added it to the last line.

How can we read the program first?

I am a newbie, and I am in full entry stage for php ......

However, no syntax error is reported for your code here!
Of course, it is impossible for me to execute relevant code without your database environment
However, "you have not selected a subject. please choose a topic !" I am sorry, there are still 16 lines of less important code before I show you images. If I add} to the last correct one, where should I modify it?

What's the problem at the end?

The code you posted is correct!
If 16 lines of less important code are added, the problem is that 16 lines of less important code.


However, no syntax error is reported for your code here!
Of course, it is impossible for me to execute relevant code without your database environment
However, "you have not selected a subject. please choose a topic !" I am sorry, there are still 16 lines of less important code before I show you images. If I add} to the last correct one, where should I modify it?

What's the problem at the end? In the end, it will be displayed (! ) SCREAM: Error suppression ignored
(! ) Notice: Undefined variable: search in D: \ wamp \ www \ selectsubject3 \ query1.php on line 3
Call Stack
# Time Memory Function Location
1 0.0010 149536 {main} () .. \ query1.php: 0

From http://bbs.csdn.net/topics/390451883? Page = 1 # post-394465455 # Code
$ N ++;
}
}?>




Actually missing}

Notice: Undefined variable: search
Prompt $ searche variable is defined

From http://bbs.csdn.net/topics/390451883? Page = 1 # post-394465455 # Code
$ N ++;
}
}?>




Yes, I did.} then I tried to see where to add it. Is it my database?

Notice: Undefined variable: search
The prompt $ searche variable is defined. what should I do?

$ What is search for? is it taken from the form on the previous page? Describe your business logic in detail.
In addition, the code should be fully pasted.

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.