Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Auto create profile page for users that register? Please help!

Participant ,
Aug 11, 2009 Aug 11, 2009

Hi everyone,

I am building a site along with other people and I am the main web designer. I need to know how to have my site automatically create a users profile page when the said user registers on the site. Something very similar to YouTube or MySpace. Example: If a user where to create an account with the username bob678 the site/code would a page called examplesite.com/userid/bob678 (like I said before very similar to YouTube). I cant seem to find the answer to this anywhere but I know it is possible. Any and all help is very appreciated!

PS. I already know how to allow people to register, I just need it to create a page for them.

TOPICS
Server side applications
11.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advisor , Aug 12, 2009 Aug 12, 2009

You could easily create a user profile page by creating a filtered recordset that filters user_id from URL parameter so example.com/page.php?id=bob will show bob profile and example.com/page.php?id=sue will show sue profile. if you want example.com/users/bob you have to use dynamic mod rewrites

You never mentioned what scripting language you're using and it helps with app development questions. I am assuming you're using php but next time you post please mention what scripting you're using to avo

...
Translate
Advisor ,
Aug 12, 2009 Aug 12, 2009

You could easily create a user profile page by creating a filtered recordset that filters user_id from URL parameter so example.com/page.php?id=bob will show bob profile and example.com/page.php?id=sue will show sue profile. if you want example.com/users/bob you have to use dynamic mod rewrites

You never mentioned what scripting language you're using and it helps with app development questions. I am assuming you're using php but next time you post please mention what scripting you're using to avoid speculation.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 12, 2009 Aug 12, 2009

I am using PHP

I am currently doing it in a simillar way to what you just explained, but the problem is I want other users to visit each others pages and be able to leave comments and stuff. Is there any way to do that with what you explained below? And that thread didnt help very much. Thanks anyway though.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 12, 2009 Aug 12, 2009

Yes there is a way for users to visit others profiles and add comments and stuff but you have to add the comments and stuff which would be another discussion topic. In this discussion thread you asked how to create user profiles from registration and that was explained. Asking how to add comments and stuff to a users profile is another discussion topic. Please don't threadjack your own thread with questions unrelated to the original discussion which was about creating user profiles from registration.

Sorry the linked thread didn't help you. It was the exact same question and was answered for the other poster. Perhaps you should re-read the thread; you might find something helpful that answered the question for the other person. Hint: the helpful posts are marked helpful with a little star in the title head.

your duplicate post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 13, 2009 Aug 13, 2009

Yes, there is a way to do all of this.  It's called "joomla"  Google it. Download it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 20, 2009 Aug 20, 2009

Ok here it is. How to create the profile page automatic after registering. I'm assuming you have created a "register.php" page and a "login.php" page. Both pages have a relationship with your database tables using PHPMySQL as well. When you created the login.php page a session variable was created. You can find it on the login page only when viewing the page in code view. The session variable will be named "MM_Username"  this is case sensitive. Remember this variable.

Step 1-

        Create a new blank.php page. and save it as myprofile.php

Step 2-

        In the bindings menu under applications on the side click the + and choose "Recordset Query". Then stay in the Simple Mode and choose the database connection. Then choose the table containg the columns that you created for your register.php page. Keep the all radio button too. Then choose the database column you designated to be used for storing the username and proceed to:

                                                                                     Filter: "username"              =

                                                                                              "Session Variable"    "MM_Username"

                                                                                              "Sort"                       "None"

Step 3-

       In the Server Behaviors menu click +, User Authentication- Restrict Access to Page. Set "If access denied, go to: login.php". Then click + again, User Authentication- Log Out User.

Step 4- Insert a table on the page body. Then In the Bindings menu open the + sign of your created recordset. This will display all the columns in your database table. Place the cursur inside the page body table. Then highlight the "username" column from the Bindings menu and click the insert button. This will display the username. Repeat with all columns you wish to be displayed. Save this page.

(Remeber to edit your login.php page by setting "If login succeeds, go to: myprofile.php)

Step 5-  "Synchronize Sitewide".

Step 6- Now test the function you just created by starting from the top:

Register as a new user. Once you have submitted your user information go to your login page and login with your new username and password. And if login succeeds, you will go to: myprofile.php. Once the myprofile.php page loads, your username and all the columns you inserted will be displayed. Try registering a second user and see the automatic profile page create.

The secrete in this process is the recordset query being:

                                                  Filter: "username column" = "SESSION VARIABLE" "MM_Username"

Setting up th recordset to be filtered by username tells the page to only display the records of the username that is logged in. If you were to keep the recordset query filter to "None" then every user records will be displayed on the page creating like a directory/phone book page.

To sum things up make sure to save the page as a .php first thing. Then create the recordset query. Then restrict access to the page. Then add the log out to the page. This must be done in that order before anything else.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 20, 2009 Aug 20, 2009
LATEST

Nice write up but I don't think it's exactly what the OP was looking for. Pretty sure the post marked as "answered" was the one that answered the question which related to using dynamic mod rewrites to create example.com/selected_username URL upon registration. For other poster I think Joomla is not an acceptable alternative for application development.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines