At the very bottom of your page add this for a test.
<?php
print_r($_SESSION);
?>
On refresh are values still available?
IF NOT, make sure there is no space before opening php tag or after a closing ?> tag (if you have one) in you connect file. In other words, nothing can be sent to browser, line returns etc.
Also are you viewing the page on its own? Not within some kind of program that might send something to the screen?
no, I am running the page on its own. there is nothing else running with it. my appvars include file is only two Constant for my picture upload path and the maximum size of hte file to be uploaded. Beside that all of my include file are only html. no php
hahaha no I have corrected that type=“input” first thing when I started talking with you a few days ago lol. I have found something thoughin the firefox inspect element:
Warning: mysqli_query(): Couldn't fetch mysqli in C:\xampp\htdocs\SFDB\form\employee\add_update_employee.php on line 179
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in C:\xampp\htdocs\SFDB\form\employee\add_update_employee.php on line 180
no all of them looks good. I wouldn’t be able to upload any data into the database if any of the field names were wrong. I have 100% success on all field being upload and have 100% success at populating my select boxes with everything that is sitting in my database.
I also get the same result for the jobtitle select tag: (not fire fox but Chrome inspect element, but same thing in firefox)
Warning: mysqli_query(): Couldn't fetch mysqli in C:\xampp\htdocs\SFDB\form\employee\add_update_employee.php on line 167
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in C:\xampp\htdocs\SFDB\form\employee\add_update_employee.php on line 168
Not sure I am following, you are saying both select fields are populated, yet you are getting errors on those lines? I’m not sure how that can be possible.
hahahaha indeed!!! and also, I do not get the error message on my form and I made sure to comment
//error_reporting (E_ALL ^ E_NOTICE); so it shows all errors
I invite anyone following this topic to jump in if you can see why query works before submit but not after. The only thing I can think of at this point is to change variable name of sql statement so it is unique on the page.
$employersql = "SELECT employerid,employer FROM employer";