Haven't you learnt yet that you can't always copy/paste code and expect it to work straight out of the box?
I created a connection $db and passed that as a parameter. However, you created a connection $conn so pass that instead.
$pdf = new attendPDF($db, $_GET['oracleid'], $_GET['sdate'], $_GET['edate']);
^
^
$conn