�&ǐk�@'bJ�h�ۊL'}T� :��'2�Z#$��n�a��� �>a��`��_3d�Qpt�/�P -��#5�,�M��� �pA:©�q�����NW��ډ�A���� �9nʺج���� �TSM��{J6?7��r�@�\����D��� �׶���s�f�TJj?"��D��`?��̒� b�#�%�C*v�$�{�$����5Ծ�F�s��y�e/8��h-�f�̰&(����Gj�L:U� 2�� ����v�_k����Y��gp,�k�WF�R������_C�R��N@���R�@�ߔ?A�w9���F("iNa-S���Q�o�3tDMLh*�#4k�T/iQ��Y*�G��m����)��8�hBm/�I�,g�ﯖ���Z��}�Cz�q@´��d.����L�ŕ�,��1�Z�܌�: ̪���F+J-'��c�tvJ8��]Q-��b��y �6;*J`r_�d ��'�G ~p��)'�C,�%F��E(��2�k�����lР�z�!�=t ��_�0��f7��� ;�p�|�U �% Add Products
prepare($sql)) { // Bind the parameters $stmt->bind_param("sss", $categoryName, $targetFile, $categoryType); // Execute the query if ($stmt->execute()) { echo ''; echo ''; } else { echo "Error: " . $stmt->error; } $stmt->close(); } else { echo "Error preparing the statement: " . $conn->error; } } else { echo "Sorry, there was an error uploading your file."; } } else { echo "Invalid image type. Only JPG, JPEG, PNG & GIF files are allowed."; } } else { // If no image is uploaded, set the image as NULL or empty $targetFile = NULL; // Insert data into the database without the image $sql = "INSERT INTO categories (name, `first-image`, `type`) VALUES (?, ?, ?)"; if ($stmt = $conn->prepare($sql)) { // Bind the parameters $stmt->bind_param("sss", $categoryName, $targetFile, $categoryType); // Execute the query if ($stmt->execute()) { echo ''; echo ''; } else { echo "Error: " . $stmt->error; } $stmt->close(); } else { echo "Error preparing the statement: " . $conn->error; } } } ?>

Add Categories

Categories Details