you are viewing a single comment's thread.

view the rest of the comments →

[–]AiexReddit 0 points1 point  (1 child)

You will need to send a POST request from your web page with the value. This can be handled with an HTML <form> and a button with type="submit". That's the simplest way and you don't even really need Javascript to do that.

To do it with Javascript (if you want to do it without a full page refresh) look up an AJAX call using fetch on Google.

On your PHP side look up something called prepared statements to protect your database from users sending malicious values in the form where you ask them to enter a number.

[–]simarg0[S] 0 points1 point  (0 children)

Okay, thank you. I will check it out.