Sorry about that I wasn't really paying attention to what I was doing when I posted this. I have figured out the problem though.
1. I was using mysql instead of mysqli so that was where alot of my problems and error's were coming from.
2. My index.php file contained alot of whitespaces (invalid characters).
Once I fixed all of that everything works like a charm.
I will make sure next time I will provide more information on my problems. And yes I am new to PHP and MYSQL but it is a good learning experiance though.
Once again thanks again for your time and the great book. I am almost done reading it and can't wait to finish. Thanks