Skip to content

Tag: php

Empty Response from a webhook using php

When a new record is created or updated, the Webhook is triggered and it posts three keys in the post body. One of the keys named payload contains encoded JSON with attributes of the record. This is an example of the POST body message:See the Payload here I want when the webhook fires it creates a file and po…

Insert into DB with PHP and Postgresql

i don’t understand why i can’t insert into DB. I have create a DB with this table: prenotazione (id,nome_rich,cognome_rich,email_rich,oggetto_rich) interni (id,nome_int,cognome_int,email_int) esterni (id,nome_est,cognome_est,email_est) this is my index.php And this is the input.php that i used to …

How to store array in Laravel?

There are two mysql tables 1.seats (id,number), 2.reservedseats(id,seat_id,sceering_id). I show all the seats of a specific sceering as checkboxes in show.blade: {!!Form::model($screening,[‘method’=&…

Sum price of one to many relation ship (laravel)

i have problem with one to many relation ship! So im try to sum product prices so here is what i mean: Model: Product.php Model: Orders.php So i want make smth like this: $var->product->price->sum(); My database if it needed: Orders: id product_id|user_id| |-|———-|——-| |…

MySQL 5.7 equivalent to PHP’s json_decode()?

I’m converting some php scripts into mysql stored procedures and have come across the usage of php’s json_decode() on a result set’s data. It occurs on a field which is stored as a mediumtext,utf8,utf8_unicode_ci How can I perform the ‘json_decode()’ process using pure MySQL? Sam…

Error: Class ‘PHPMailer’ not found

Error: Fatal error: Uncaught Error: Class ‘PHPMailer’ not found in C:xampphtdocsphp-mailerindex.php:4 Stack trace: #0 {main} thrown in C:xampphtdocsphp-mailerindex.php on line 4 My PHP Code here: Please let me know what mistake I made here in my code. Answer It’s because you’ve not con…

Symfony 4 – Autowiring not working

I have a form that write values to an specific Entity, and I am trying to edit the information through a function in the controller, pretty simple. BancoController.php The problem is, when I access /banco/{id}, I get the error: My service.yaml is all default, so I guess it should work automatically. The entit…

Impossible to load pdo driver on Windows Server 2016

Im trying to load the pdo driver for firebird database on a windows server 2016 (64 bits). Configuration is the next : Firebird in 32 bits successfully installed. Apache 2.4 successfully installed (Apachelounge binary, 32 bits). Apache configuration properly set (installed in C:/Apache24) PHP 32 bits successf…