I thought I understood how to create a new instance of a PDO class but I aint seeing the expected result.
basically I have a few instances initiated to pull out data from the database to populate a few select/option tags. I also have an instance created to check users. I have another one(which started this whole discovery of problem that is supposed to insert data from a form to my database.
Funny observation that I just noticed by looking at the page source. I have notices all over the place saying:
example of one of them:
<b>Notice</b>: Undefined property: stdClass::$device in <b>C:\xampp\htdocs\database\firesafety.php</b> on line <b>151</b><br /> <option value="1" >Smoke Alarm</option>
But All my select tags gets populated as they should. I didn’t even know something was wrong since I used the same scripts with another page and all is fine.
I did a few var_dump test here and there with various variables that are holding each instance of a new PDO and for some reason every variable echo out the same way, returning the same data no matter the name of the variable(which none are pulling the same kind of data from my database, but somehow all the select tags are getting populated properly??? I can’t see the content of a instance since no matter which variable I try to check in my page I always get the same data returned to me???
my question is: how is this data making its way to the proper select tag if the wrong data is being held in a variable with the worng data in it?