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.