I want to know how to create url directly dynamically fetching data from mysql in php?
Let assume I have a database table named "Products":
1) id
2) seller_id
3) Product Code
4) Product Image
5) Product Description
- Let assume there are 5000 products added in it or more.
- Let assume my domain name is: www.xyz.com
Now what I want is to create urls from product table's seller ids like www.xyz.com/sellerid1
If new seller id added then I will get url dynamically automatically and on that page get all related products related to seller_id from table "Products"
I want url like
www.xyz.com/sellerid1
www.xyz.com/sellerid2
www.xyz.com/sellerid3
My File Name is where I want to fecth data from "Products" table: seller.php
I dont want url like:
www.xyz.com/seller.php?id=sellerid1
www.xyz.com/seller.php?id=sellerid2
www.xyz.com/seller.php?id=sellerid3
I want if someone hit the url directly on addressbar like: www.xyz.com/sellerid1 then all the products related to sellerid will show. It can achieve this by www.xyz.com/seller.php?id=sellerid1 but no user will remember that type of url. I want www.xyz.com/sellerid1
Sorry, two questions in one but I have no idea how to achive this dynamically.
Any idea or suggestions would be welcome.