Programming
Converting user id to username

Question Description

I’m working on a Programming exercise and need support.

Hello

I have a register system and when the user registers, the user gets a link to their profile so they get this http://site.com/view_account.php?id=48

I want to change it like this: http://site.com/username 

Like how YouTube have theirs, http://youtube.com/smosh

Does any one know how to do it?

If anyone does, just ask what part of code you require, I don't know which code to send

Thanks.

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

Final Answer

Hi,

Try this generator.. you will have to experiment with this. http://www.generateit.net/mod-rewrite/. If you want to do it by $_SERVER['REQUEST_URI'] method, you will to be offer a higher payment arrangement. I can write a simple script for this, similar to MVC framework router.

Veedeoo (123)
UCLA

Anonymous
Top quality work from this tutor! I’ll be back!

Anonymous
Heard about Studypool for a while and finally tried it. Glad I did caus this was really helpful.

Anonymous
Thank you! Reasonably priced given the quality

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4