質問

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?

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top