Questions tagged as 'php'

1
answer

Send a file with ajax and process it with php

I am developing a text editor, I am trying to upload live files, where you load the file and it appears in the text editor similar to word, I am doing it without a form so it is more complicated to process it with PHP, I want that when lo...
asked by 14.11.2017 / 18:34
2
answers

fill an array with default values if it does not exist

Hello Good evening, I have this code $total = array(); $months = array(1,2,3,4,5,6,7,8,9,10,11,12); foreach ($months as $value) { foreach ($total_clients as $clientes) { if($value == $clientes->month){ $total[$value...
asked by 10.11.2017 / 05:20
1
answer

Problem obtaining the current url using php

Hi, I have the following error when it comes to obtaining the current url using php The URL is as follows:    http://localhost/token.php?#access_token=EAALhZB1GcFMUBAIk7fEy1221212HjQUT6wb0NypHpKYRKRxcQVcKxmn56hn0RdZB6LO6qyppN1Jc7VBjcJITzOo...
asked by 13.11.2017 / 20:33
2
answers

Insert data in MySQL mediating form and PHP

Good afternoon, I am trying to do an exercise that consists of a bus manager, trying to register new buses through a form. I attached the code and my doubts to see if you can help me: The form where the data is entered: <form action="fun...
asked by 09.11.2017 / 18:49
1
answer

Problems with the routing file

Hello everyone I'm new using symfony, so I appeal to you for your humble help it happens that I found an exception:    The routing file   "/home/development/my_project_name/src/ApplicationBundle/Resources/config/routing.yml"   contains unsupp...
asked by 07.11.2017 / 18:43
1
answer

Insert image in select option

I have this function, what I try to do is add an image to an option but there is no way. To say that the value of the fields introduces me well in the option select but the photo does not appear. The page does not give any errors, I simply di...
asked by 06.11.2017 / 21:24
1
answer

Get a query from a table [closed]

Greetings, I have a list of names of a database in a table, to give in see details, I linked to another php file in which I would like to see the full details of that person and not leave the rest here I have the code of the details of the perso...
asked by 07.11.2017 / 18:25
4
answers

Use array_diff with Laravel

I'm trying to use the function array_diff of PHP, the problem is that I try to do it with two variables that I have in my function. $var1 = Model::all(); $var2 = Model1::all(); // Trato de eliminar valores repetidos $var3 = array_diff(...
asked by 05.11.2017 / 15:21
1
answer

How to pass data with json

I need to pass from PHP a JSON to each field that corresponds the value, for the moment I try with the value of select and you are supposed to put it in the cedula field. I attach the code $(document).ready(function(...
asked by 14.01.2018 / 23:03
1
answer

Do not repeat words within a loop in PHP

Each time the loop advances it brings me data for example: light, light, darkness, sun inside a loop how can I do so that they do not repeat themselves? foreach($json as $key => $item) { //json se ha procesado para que devuelva palabras...
asked by 15.01.2018 / 15:35