loki421
10-26-2010, 03:07 PM
Hi guys!
I'm looking into routing with php, but have no idea where to start!
I was hoping someone might be able to explain it a little to me?
The way I imagine it working would be something like www.mydomain.com/myuser
And that would point to my user page. My question is how would I pull the user data from the db?
Whenever I extract data on a page I use url strings like userpage.php?id=1, and this would get me user id 1 from my database.
but the page is called userpage.php. How can I get www.mydomain.com/myuser to work?
I guess the best example I can think of off the top of my head would be facebook. If you google your name + facebook, you'll get results with www.facebook.com/yourname, and this will take you to your public page.
This is the same sort of thing I would like to know how to do, but just cant see how it works without going to a specific page like userpage.php?id=1
I just need to know the logic behind how the url www.mydomain..com/username works. I've done a bit of googling but the tutorials I've found aren't very clear for someone trying to learn the process, or maybe I'm just being dumb! :p
Has anyone ever done this sort of thing before and how does it work? It's something I would like to learn how to do, so any good articles or advise form anyone would be very gratefully recieved as always! :)
I'm looking into routing with php, but have no idea where to start!
I was hoping someone might be able to explain it a little to me?
The way I imagine it working would be something like www.mydomain.com/myuser
And that would point to my user page. My question is how would I pull the user data from the db?
Whenever I extract data on a page I use url strings like userpage.php?id=1, and this would get me user id 1 from my database.
but the page is called userpage.php. How can I get www.mydomain.com/myuser to work?
I guess the best example I can think of off the top of my head would be facebook. If you google your name + facebook, you'll get results with www.facebook.com/yourname, and this will take you to your public page.
This is the same sort of thing I would like to know how to do, but just cant see how it works without going to a specific page like userpage.php?id=1
I just need to know the logic behind how the url www.mydomain..com/username works. I've done a bit of googling but the tutorials I've found aren't very clear for someone trying to learn the process, or maybe I'm just being dumb! :p
Has anyone ever done this sort of thing before and how does it work? It's something I would like to learn how to do, so any good articles or advise form anyone would be very gratefully recieved as always! :)