while & loop functions with MySQL not working correctly. Please help!

Printable View