I am updating my database with a form. I have it outputting the values of everything to check to make sure everyting is working correctly and it is, but when it adds it to the database everything is wrong. If the quantity is 20000 it just changes the quantity in the inventory to 1. I dont understand. I am still learning MySQL but this is irritating
<?php
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
require("serverInfo.php");
for($i = 0; $i < 10; $i++){
$quantity = $_POST['quantity'.$i];
$company = $_POST['company'.$i];
$size = $_POST['cardSize'.$i];
if(isset($_POST['box'.$i])){
echo $quantity . "<br / >";
echo $size . "<br / >";
echo $company . "<br / >";
mysql_query("UPDATE `printRun` SET Quantity = '$quantity' AND Size = '$size' where status='Open' AND Company = '$company'");
}
}
mysql_close($link);
}
?>