Skip to content

SQL query to update item quantity using PHP PDO

Good morning everyone I am trying to update the table with the new quantity selected, when I run the following function, however, I get this error: Function to update the quantity, function_products.php: product_update_process.php What could be the issue here? Thanks for your assistance. Answer To add to @Tan…

Laravel Redirect from Helper Class

I’m trying to redirect to an external URL from a helper class. Here’s my controller: Here’s my helper class used in the controller: Why is the redirect() not working inside my_function()? Do I need to include some Laravel classes using the PHP “use” statement? Answer You can add …

Symfony 5 using the validation to validate a new entity

I’m using Symfony 5.3.7, and using the @Assert annotations, attempting to validate a new user upon registering. Trying to understand the docs however not getting anywhere. Ideally I’d like to be able to understand how to validate an entity using these annotations. I’ve tried using a separate…

Symfony 3.4 – cannot load field value

I’m using Symfony 3.4.47 w/ MySQL 8 and getting a field value wasn’t a big thing until today. I’ve created a migration file to add a new field to an existing entity: And I’ve added the field ‘cliente_apelido’, getter and setter to the ‘Plano.php’ model: It turns…

server side data validation with nesting

I cannot figure out why my nesting here is not working. Whenever I run this it goes straight to ‘Incorrect password’ (with all the fields blank) even though the condition about string length that proceeds it, is false. A reading of ‘Email and password are required’ is what I want to ha…

PHP Echo ipv4 and Ipv6

How Do I make it so my script echo’s both IPv4 And IPv6, but if 1 of them is not detected it will say ”Not Detected”. Answer There’s only one address, IPv4 or IPv6. You can detect using the filter extension