I would like to make a simple form button that completely destroys the session when you click on it. I am just starting to use PHP for the first time and cannot see how I implement it in my HTML code.
I want just a form button that will clear the session (and maybe an explanation of how it works)
A form button is like any other form button, nothing special. Catch the POST on the php side of things and use session_destroy (); completely kill session data.
. , : http://www.tizag.com/phpT/postget.php http://www.tizag.com/phpT/phpsessions.php
PHP , : http://www.tizag.com/phpT/forms.php
:
Order.html:
<html><body> <h4>Tizag Art Supply Order Form</h4> <form action="process.php" method="post"> <input type="submit" /> </form> </body></html>
process.php:
<html><body> <?php session_destroy(); ?> </body></html>
... ?
Source: https://habr.com/ru/post/1751646/More articles:пытаясь увидеть, не имеет ли вектор значений в карте <строка, строкa> - c++Use a variable inside a variable? - javaprogress bar on image upload - iphoneHow to get a large number as input and store it in memory - inputA TypeLoadException occurred while dragging a user control in VS Designer - c #Problems printing IE8 using jqplot - jqueryWhy didn't webview loadHTMLString hit a callback in WebViewDidStartLoad? - iphoneXML Length Limit - sqlForm Based Authentication - securityEquality between two separate xy-pic diagrams in LaTeX - latexAll Articles