I did a small table thats ask for product name and product # my question how can I alert the user that he is leaving the page without saving the information.
<form action="index.php" method="post">
<input type="text" name="pnumber" value="" placeholder="Product Number...."/>
<input type="text" name="pname" placeholder="Product Name...." /> <br>
<button id="save">save</button>
</form>