I wasn't only talking about the order in which you have the lines.

if (!$2) { echo No username or password specified. } <- One of the two may be specified.
elseif (!$1) { echo You have no password. } <- neither have been specified.