PHP sessions with HTML

前端 未结 4 1906
温柔的废话
温柔的废话 2020-12-31 22:44

I have a website which uses PHP and HTML pages, I want to create a session which stores a username from the login page. But the login pages are php and the next pages are ht

4条回答
  •  不思量自难忘°
    2020-12-31 22:56

    You can't put php into .html files without playing around with your server's configuration files. You should only put php into .php files.

    If you have a lot of .html files, you can simply rename them to .php files. It's okay to put pure html into something.php. So, you should make sure that all of your files end with .php, and then you can put any session logic you want into them.

提交回复
热议问题