It's a goog practice to set link_identifier of MySQL connection :
mysql_select_db("agile", $dbc) OR ('coul not select db : '. mysql_error());
About your learn and write you code in oop, you have to read more about tendency and practice in PHP OOP.
Everything about these things : how to declare classes, methods, members, what types exist, design patterns in OOP ...
About your code you can try to organize some classes structure based on your logic and requirements.
Just foe example :
class Config
{
const DB_HOST = "localhost";
const DB_USERNAME = "username";
const DB_PASSW