Questions tagged as 'php'

2
answers

PHP Fatal error: Call to a member function bind_param () on boolean

I've looked at it more than 100 times. Somebody sees the error. I'm trying to make an update. public function modificar_producto($datos) { $ok = "false"; $sql = "update productos set " . "codigo_articulo=?," . "titulo_p...
asked by 13.02.2017 / 05:12
1
answer

send mail with test mail server tool

I need to enable the sending of mails by form. It is the first time I do it. I am based on this link: link I installed the mail server test tool to simulate a mail server: link With this, what I do is not send an email but "falsify" a sh...
asked by 16.02.2017 / 17:31
1
answer

Loop syntax when it has no results

I have a loop that runs through an array that comes from a multiple select and stores the results in mysql. The fact is that there is the option that this select does not exist, so the loop does not make sense. I have tried to enter a conditi...
asked by 30.01.2018 / 22:49
1
answer

Because blank spaces are generated in my input value

<input type="text" class="form-control txt_respuesta54_act" name="txt_respuesta54_act" required value=" <?php if ($trim == 1){echo trim($respuesta_Trans_Q2);} elseif ($trim == 2){echo $respuesta_Trans_Q3;} elseif ($trim == 3...
asked by 30.01.2018 / 23:22
1
answer

Gettext does not translate into PHP web

My system is Ubuntu 14.04.1, with apache 2 with PHP 5.5.9-1ubuntu4.22 Problem: I want to translate my web application made in PHP with Gettext and I can not get it translated. So I created a new project with the minimum necessary to make tran...
asked by 31.08.2017 / 10:34
2
answers

Help with this error SQLSTATE [23000]: Integrity constraint violation: 1452 Can not add or update to child row: a foreign key constraint fails

Good I am trying to fill two tables of related data bases in Laravel using ajax one of books use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateLibrosTable extends Migration { /** * Run th...
asked by 06.01.2017 / 00:44
4
answers

Random data in Blade / Laravel 5.1

I want to generate random data in my views, specifically I want to go through the results of a query and each one assign a different color, all this in my views of Blade (Laravel) . Something like this (similar to what I want to do): $ar...
asked by 12.11.2016 / 03:05
1
answer

How to keep data in my session during all requests in Laravel 5.1?

Greetings, what I need is to keep some data sent from a form in an array that I store in Session de laravel, I'm doing it in the following way: In the routes.php I have: Route::bind('evento', function($slug){ return Deportes\Even...
asked by 07.07.2017 / 13:27
1
answer

Thousand separator in php or mysql

I have a query where it shows the numerical values with thousand separator (1,500) and I have two problems: When I open the modal window to edit the values it shows me the values with the thousand separator, but if I edit the value of one f...
asked by 10.07.2017 / 04:03
1
answer

Doubt to create a ModelFactory Laravel 5.3

Knowing that I have 3 tables: people (id, name, surname) $factory->define(SIMante\Personas::class, function ($faker) { return [ 'nombres' => $faker->firstName, 'apellidos' => $faker->lastName, ]; });...
asked by 22.11.2016 / 05:03