0

I'm looking to create a user admin area and public profile page with custom URL in PHP. I have found a great tutorial on users creating their own private admin area. However, I'm struggling to find further guidance on the following:

  1. Creating a public custom URL (such as as website.com/username) based on what the user requested on signup.

  2. Using that custom URL to display public profile page with selected information the user entered into their private admin area.

I know this is bread and butter stuff but I'm leaning PHP so any guidance and best practices at this stage are very welcome.

Thanks, Jack.

1 Answer 1

2

You could try the following:

  1. Use mod_rewrite (assuming you have an Apache server) to forward all domain.com/abcde requests that don't match an existing file or directory (see -f condition) to domain.com/user.php?name=abcde
  2. In user.php, get all the data based on the user-chosen name from the database and display it, display an error message if no user is found.
1
  • Easy when you know - Thats exactly what I needed: a simple workflow to get me started. Sep 24, 2013 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.