Error when inserting into BD

Asked

Viewed 56 times

-4

Guys, I’m having a problem registering customers in the comic book. When I click the sign up button, it just refreshes the page and does not insert the client in the comic book. No error and nothing. Just update the form and you’re done. When I take the data array(from image 2) and put only an echo to see if it rotates, it appears that it was inserted, but when I use this data with the instantiated array to insert in the BD, it does not insert. What can it be? I’m taking these Youtube lessons and my code is the same as what I saw and the guy doesn’t answer.

ERRO 1 ERRO 2

1 answer

1

The fact that the code does not show the error is because you are returning false when a mistake is cast in the Try.. catch.

Tip: Avoid doing this to the fullest. Always handle errors and always store these errors in a log, so you’ll know how your code is behaving.

The error is on the line if ($inserir->execute()($pegaValores));. The correct would be (I think, because I do not know the video class) if ($inserir->execute($pegaValores));. She’s got too many parentheses.

  • Man, what the hell... I looked at the whole code and I didn’t see this plague of parentheses there... it was this unfortunate fellow... Aff.. Thank you so much for the reply... Saved my day

Browser other questions tagged

You are not signed in. Login or sign up in order to post.