Gnahzllib Gnahzllib - 6 months ago 16
HTML Question

How to create 'add quantity' input box and embed it inside PHP scripts?

How can I create a input field like the one in the image? And I want to embed it inside $_POST. Thanks for your time :)

add quantity input box


This is an HTML5 input of type number. You use it this way:

<form method="POST" action="yourPHPfile.php">
  <input type="number" name="number_input">
  <input type="submit">

When this form is submitted, it will send the selected number to yourPHPfile.php and you can retrieve the number from $_POST['number_input']