I am creating a shopping portal where each customer will post their products and we will be providing a separate username and password for that customer once payment has been made. So I need to create an URL link separately for each customer so that it will show the products of that particular customer.
For example like Facebook if I create a separate account, my page becomes (https://www.facebook.com/dinesh.darkknight) where my own details or the posts has been shown. Like that, I need a separate page for each customer in my site (www.seloncart.com/customername). Once I give that customer name it should show the products posted by that customer alone.
ScriptAlias / /hosts/example.com/htdocs/yourApplication.php
)$_SERVER['PATH_INFO']
to determine what the user name is (if there is one).You'll probably find that a lot of MVC frameworks help rather a lot with steps 2 and 3.
If you use a framework like CodeIgniter, your URL works like this:
www.url.com/Controller/Function/Argument/Argument...
So in the code you might have:
class Account extends CI_Controller{
public function info($username){
echo getInfoPage($username);
}
}
Which would translate to:
www.url.com/account/info/dinesh
You can also look into changing your .htaccess file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With