Clicking on user John Smith in position user_id 1 It should go to the url www.example.com/John-Smith as opposed to profile.php?uid=1
When you click on user John Smith in user_id 2 It should go to the url www.example.com/John-Smith-2 profile.php?uid=2
When you click on user Kia Dull in user_id 3 It should go to the url www.example.com/Kia-Dull profile.php?uid=3
Table Users
User_id First_name last_name
1 John Smith
2 John Smith
3 Kia Dull
How do I format my .Htaccess file and php/sql for this.
When a user profile is clicked I just simply lead it here.
<a href="<?php echo $row[first_name] ?>-<?php echo $row[last_name] ?>"
which doesn't do anything.
and here's my .htaccess
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)$ profile.php?uid=$1 [L]