Hi, I have a web-based inventory system that uses a MySQL database. First a user inputs a brand to search for, then he is asked which items (in that brand) he wishes to update. The users is then brought to an update page that should (I NEED HELP!) allow him to increment or decrement the present quantity in inventory. This project utilizes PHP, MySQL, and Javascript. Currently, I can increment or decrement only one item. I need to be able to increment each individual textbox for database updating. How do I do it?
function add()
{
var TextBoxValue = document.getElementById("value");
var number = parseInt(TextBoxValue.value, 10);
TextBoxValue.value = number + 1;
}
function subtract()
{
var TextBoxValue = document.getElementById("value");
var number = parseInt(TextBoxValue.value, 10);
TextBoxValue.value = number - 1;
if (TextBoxValue.value < 0)
{
alert("The present quantity cannot be less than 0!");
TextBoxValue.value = 0;
}
}
</script>
<p align="center"><b>Make Updates:</b>
<br />
<br />
The following items were selected for quantity update:
<br />
<br />
<table border="1">
<tr><th>Item:</th>
<th>QUANTITY</th>
<th>ADD/SUBTRACT</th></tr>
<style>
textarea {resize: none;}
</style>
<?php
//$row_id = $_POST['itemselect'];
foreach ($_POST['itemselect'] as $confirm)
{
Bookmarks