You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$loanDate = (new DateTime($_POST['loanDate']))->format('Y-m-d');
$lenderId=$_POST['lenderId'];
$loanerId=$_POST['loanerId'];
$situation=$connection->query("insert into loans (productId,type,loanDate,lenderId,loanerId) values ('$productId','$type','$loanDate','$lenderId','$loanerId')") or die ($lang["Something_bad_happened"]);
if($type==1)
{
$situation3=$connection->query("UPDATE roomkeys set status='1' where keyId='$productId'") or die ($lang["Something_bad_happened"]);
}
else if($type==2)
{
$situation2=$connection->query("UPDATE books set status='1' where bookId='$productId'") or die ($lang["Something_bad_happened"]);
}
else if($type==3)
{
$situation1=$connection->query("UPDATE computers set status='1' where computerId='$productId'") or die ($lang["Something_bad_happened"]);