Questions tagged as 'php'

1
answer

Check if "tag" is available and show it in a SELECT

I realize a system that basically is a logs of loan equipment. What I intend you to do is that users who need a computer to loan make a record, which is necessary to validate if the equipment is available or not for its use, and only appear in...
asked by 27.06.2018 / 08:50
1
answer

input range materialize does not take the value of a php variable

<?php $estatus = $resultado['status']; echo '<p class="range-field"> <input type="range" value= "$estatus" disabled> </p>'; echo $estatus; ?> I use the following lines to show a bar that will indi...
asked by 29.10.2018 / 00:01
2
answers

Upload one or more files to server received in a json

I receive a data json, which may contain one or several attachments, all of them will receive the file in base64. I give you an example: { "id": 1, "data": { "nombre": "Nombre", "file1": "Mhuc2dvCg==", "file2": "Yhj4dysYn==", "...
asked by 26.06.2018 / 17:51
1
answer

I do not receive JSON data

I have a problem receiving JSON data from a form connected to a database with fields ( id , nombre , numero ). The problem arises when I try to edit a table value and save it and it should be updated through XHR. Could so...
asked by 30.05.2018 / 13:36
1
answer

Collect checkbox values and insert them into a table using php

I would like to know how the checkbox parameters are collected in PHP. I have this form in which there are several fields and they all have order and visualization checkbox, if it is checked I want it to be "true" if not "false" and then put...
asked by 27.04.2018 / 11:07
2
answers

Error when extracting data from a relationship with laravel

I have 2 tables users and roles , I'm trying with laravel to get the name of the role which my user owns, this is my Model of roles class Role extends Model { protected $table = 'roles'; public function user(){...
asked by 17.05.2018 / 22:24
1
answer

Upload images and pdf files with php and mysql

Hi, I have this code that I have been able to assemble, I only upload the images, but when I select a pdf file, it is not saved in the indicated folder, they could tell me what my error would be, this is what I have function AgregarRecepcionCe...
asked by 19.04.2018 / 19:49
1
answer

Undefined index json_decode php_curl

hello friends I try to get a field of this json that I get from a query with php curl: <?php $ruta = "https://ruc.com.pe/api/beta/ruc"; $token = "808e687d-3960-43c1-9a75-c102cdecf1a4-77600153-fcd3-4a2e-a1f8-1327b"; $rucaconsultar = '10486...
asked by 02.05.2018 / 16:52
1
answer

Create a history table with trigger or html, mysql php

I have a table of people and I want to make a history of changes in a table only if I change the level or year that is inserted into a table called history, I do not want it to be inserted if I update its address. ONLY if I update your level...
asked by 13.04.2018 / 00:16
2
answers

Pass an array to objects in php

foreach ($video_filer['items'] as $video) { if (isset($video['id'])) { $date = new DateTime($video['snippet']['publishedAt']); $time = covtime($video['contentDetails']['duration']); //convert the date $video_da...
asked by 12.04.2018 / 06:09