Question: In development, should we convert the .html or .htm file extension to .PHP?
To implement the PHP session, and not to redirect if the session is destroyed?

I mean, in C# we use `RedirectToPagePermanent` to keep the user to only access the pages the system will be redirected.

How about PHP?

for example process.

1. Login Page
2. If the user exists:
3. Create a cache or session.
4. Redirect to Main Page.
5. if not then notify the user, and stays on the login page.
6. On Main Page, there is a logout button.
7. User clicks.
8. Session destroyed.
9. Redirect to the Login page.
10. if the user clicks the back button of chrome, the main page will not be shown or redirected because there is no session.

So, in PHP, should I convert all the .HTML or .Htm file to .PHP?

Answer: 
```
subqueries1 = ['name','name2','name3']

def sub_view(qry, subqueries):
  qry_list = []
  for sub in subqueries:
    qry_list.append(qry + """SELECT * FROM""" + sub + """ WHERE id=weather""")
  return qry_list

x=sub_view('qry',subqueries1)
for i in x:
  print(i)

```
you can use "lambda" like this:

```
def sub_view(qry, subqueries):
    return list(map(lambda s: qry + """SELECT * FROM """ + s + """ WHERE id=weather""", subqueries))

```

also you can use "for" like this:

```
def sub_view(qry, subqueries):
    qry_list = []
    for sub in subqueries:
        #qry_list.append(qry + """SELECT * FROM """ + sub + """ WHERE id=weather""")
        qry_list.append("""%s SELECT * FROM %s WHERE id = weather""" % (qry, sub))
    return qry_list

```