Otice: Undefinedindex:

Source: Internet
Author: User
Otice: Undefinedindex: why does it show Notice: Undefined index: **? it was shown last time. after saving and shutting down, this problem occurs again next time. ** It is the data searched by my database.


Reply to discussion (solution)

Change the join key to lowercase.

When the join key is changed to lowercase, do you mean the join key in the data table? Or query statements or something?

Get rid of the error line code

It's okay to get rid of the code you posted with the wrong line, but I think this is correct! It's just a simple reference, output!

I have assigned a value for $ _ SESSION [*] on another page to get rid of the code you have pasted with the error line. do you really need $ _ POST? Cannot I assign a value to the value of mysql_fetch_row?

1. is there session_start () before Row 3?
2. Why are there uppercase letters in your $ _ SESSION array's associated keys in lowercase? Wrong code posted?
3. the session becomes invalid when the browser is closed, not to mention restarting.

1. is there session_start () before Row 3?
2. Why are there uppercase letters in your $ _ SESSION array's associated keys in lowercase? Wrong code posted?
3. the session becomes invalid when the browser is closed, not to mention that the session will be restarted after the browser is restarted? If not, how can I start it? Is apache enabled? Php? Mysql ?, At, there is no problem. I have changed it. I think the problem may be!

You only gave the code for the value from $ _ SESSION
No code is provided for assigning values to $ _ SESSION. how can this problem be discussed?

I think the problem may be 3rd!

If (mysql_num_rows ($ select) = 1) {// when there is a reasonable statement, execute the following statement $ record = mysql_fetch_row ($ select ); $ _ SESSION ['emp_id'] = $ record [0]; // obtain the user ID $ _ SESSION ['emp_acco'] =$ _ POST ['name']; $ _ SESSION ['emp_name'] = $ record [3]; $ _ SESSION ['Department '] = $ record [4];
This is the value assignment code!

This code also requires session_start ();

The value assignment is conditional, so the value of $ _ SESSION is not conditional.

On the assignment page and value page, add session_start () at the beginning of the operation to indicate that the session is to be operated. Otherwise, the operation will not take effect. at the same time, make sure that the key you saved and the value are the same.

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.