Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top