Shelby Week 2 HW 2
Week 2 HW 2
- The first 15 lines add a connection to the new database and the host's username, password, and the charset setting. A variable is then created connecting those four named 'dsn'. Finally on line 15 PDO is created and connected to the 'dsn' variable that holds all the previous info.
- There is a new basedir created, this time directed to 'https://shelbyrsimmons.com/DDWP/codex'. This is because this cfd is kept within the folder path where my other pages for this database will be located.
- Error reports are useful as they can point out syntax errors and can give an idea where the code needs fixing on or around a specific line.
- The function myHash takes passwords from within the database and adds random characters and then scrambles them 100000 times. For each password hashed it then takes record of what was added to the password to later remove it for use.