JSG said it best. $con doesn't exist.
Obviously, the site's not making the connection. For me, that was the whole point of learning how to code. How do I manage the use of frameworks and libraries, when I know I don't have the code skills that would've allowed me to do it myself.
https://www.w3schools.com/php/php_mysql_connect.asp
I'm not criticizing any one. Just talking for myself. IMHO, frameworks and libraries are the rewards for knowing how to code.
EDIT:
If needed, there are very good vids on youtube RE: PHP Objects