thecodeholic / php-crash-course-2020

235 stars 228 forks source link

I need help to fix this issue #4

Closed ivandee closed 2 years ago

ivandee commented 2 years ago

Hello, this is the issue i am getting anytime i tried to submit the form without filling them up. I am trying to submit it empty to validate the errors array and the if statement i made

Fatal error: Uncaught PDOException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect decimal value: '' for column products_crud.products.price at row 1 in /opt/lampp/htdocs/start/a/14_product_crud/create.php:29 Stack trace: #0 /opt/lampp/htdocs/start/a/14_product_crud/create.php(29): PDOStatement->execute() #1 {main} thrown in /opt/lampp/htdocs/start/a/14_product_crud/create.php on line 29

ivandee commented 2 years ago

Thanks as i have get it fix and figured out

Tapolog commented 2 years ago

Have you tried form rendarring??

On Sun, 17 Apr 2022, 12:32 ivandee, @.***> wrote:

Closed #4 https://github.com/thecodeholic/php-crash-course-2020/issues/4 .

— Reply to this email directly, view it on GitHub https://github.com/thecodeholic/php-crash-course-2020/issues/4#event-6444387109, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVNFS43VMZ32K4QZIOHFUULVFPSCVANCNFSM5TSJDWOQ . You are receiving this because you are subscribed to this thread.Message ID: <thecodeholic/php-crash-course-2020/issue/4/issue_event/6444387109@ github.com>