Question

I have a table in MySQL. I want to create a new file in my directory, to each row will have a unique page. The only problem, is that many rows are related to the same user, (same ID). I want to make sure users will only see their pages. Any idea how can I do that?

Était-ce utile?

La solution

You can use .htaccess file and virtual address like:
www.site.com/128.html
htaccess code for up address is:

RewriteRule (.*)\.html$ index.php?user_id=$1 [L]

You can check user id with $_GET['user_id'] variable.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top