second code block:
Users constructor expects an array ...
first code block:
$mem = $stmt->fetch(); no more data to fetch, returning
- username already exists in the class
- SQL, no need of a
LIMIT 1 if you have proper DB constraints (e.g. unique username)
third code block:
Users->register() does not accept parameters
The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
André Behrens, NY Times Software Developer