I'm new to web Dev, but already comfortable with HTML and CSS designed few social network web pages for my project, but I'm confused.

Do I design a mobile web separately from desktop? If yes, is it possible to use php to tell which page to send to a device?

Lastly does Facebook use this method?