Hello , Kindly tell me how to create a user in php that make me able to show user as a separate in URL. For Example i have a registration form in php that create a new user1. So how can i create a separate URL for user1 like this www.abc.com/user1. While he/she access that page , will be able to see his/her profile. Thanks
What does a normal users url look like ? You use htaccess, but without a url we cant give you an example.
What do you mean by users URL?? User can be any come to site and may register to mySite. So i want that user after creating his/her profile may access his/her own page.Like Tom registered to my site So he can visit his page on the following URL. www.localhost.com/Mysite/Tom Well I have registration page in the following URL www.localhost.com/Mysite/Register.php . Could you please elaborate how can i do this?? is it possible to do in php??
So I'm guessing you haven't created a profile page yet, well do that first, call it profile.php for example, then you can use htaccess to make a different url appear in the browser address bar.
yes i have done and named it Profile.php. Well Now kindly tell me How to use htaccess file for adding multiple users to this?? Or what to do?? Any example for this?? Can i do this at my local server for testing purpose?? Thanks for your kind reply.
If you have mod_rewrite enabled. create a .htaccess and put the following into it. Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (.[^/]*) /profile.php?username=$1 [NC,L] Code (markup): That should work, if you can already access a users url like this /profile.php?username=user1 // the word username here depends on you and how you already access users In the browser address bar for you it will look like http://localhost/user1