Set quantity to default to 1

This commit is contained in:
Ceda EI 2018-07-02 17:29:54 +05:30
parent 88ff02a5e1
commit ad8786da00
1 changed files with 4 additions and 1 deletions

View File

@ -99,7 +99,10 @@ function add_requirement() {
function deposit(){
global $command_list;
$item_id = $command_list[1];
$quantity = $command_list[2];
$quantity = 1;
if (isset($command_list[2])){
$quantity = $command_list[2];
}
$mysql = require('mysql_credentials.php');
$conn = new mysqli($mysql['servername'], $mysql['username'], $mysql['password'], $mysql['database']);