I am trying to get a users ID from a database within a class, but I have very little to no experience with classes, how could I go about getting the uid from the DB and then
There is a problem with the way your code is written, not with the class. Take a closer look at this line:
$array = mysql_fetch_array($result);
This is the first time variable $result appears on the function. Therefore, it is not possible to communicate with the database.
A possible pseudo-code would be:
uid field.Have a look at the relevant documentation first: