I have a very minimal HTML + JavaScript website, running on an Nginx web server.
I'm using Ubuntu and also have PHP7.2 installed.
I would like to trigger a PHP script execution when a button is clicked on the website.
The PHP script contains sensitive data so it shouldn't be accessible by the end user.
How can I do that?
Thanks!
HTML
<html>
<head></head>
<body>
<input type="text" name="user_input">
<input type="submit" value="user_submit">
</body>
</html>
Nginx
server {
listen 80;
listen [::]:80;
root /var/wwww/html;
root index.html;
location / {
try_files $uri $uri/ =404;
}
}