Questions tagged as 'php'

1
answer

How to apply a function to an array

I need to apply a function to a variable that returns this array: "content_block_images": [ { "image": 10741 }, { "image": 10742 } ] But this function only accepts that you enter the id simply tha...
asked by 23.11.2016 / 19:42
3
answers

Get the attribute of a button with jQuery and Ajax?

$(document).ready(function() { $(".eliminar").click(function(e) { e.preventDefault(); var id = $(this).attr('data-id'); //alert(id); $(this).closest('.holder-cesta').remove(); //Esta parte no me funciona....
asked by 10.10.2016 / 20:39
1
answer

Deeplink deeplinks on Android

How can you implement a system of Deeplink style the tinder app. That is, in the share with ... option, a url style http://go.tinder.com/md5 is added The one who receives the message in whatsapp, telegram etc ... if you click...
asked by 04.11.2016 / 11:16
2
answers

PHP readfile prints file on screen

I'm trying to download a file from the server in PHP, I'm working with Wordpress, this is my code <?php // Genera la descarga del convenio colectivo de trabajo $dirBase = $_SERVER['DOCUMENT_ROOT'] . "/wp-content/themes/accelerate/c...
asked by 24.10.2016 / 17:52
1
answer

syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

I get this error in php when I want to make a query by date someone knows where the error is, I can not find it. $consulta1+="year(cast(cast(fch as datetime)-1 as date))= " .$anio1 "and month(cast(cast(fch as datetime)-1 as date))= " .$chkBox....
asked by 05.10.2016 / 18:38
2
answers

Random error when traversing a json in a javascript function

I have an error of: data [key] .forEach is not a function. but it is totally random, sometimes perfectly executes others not. This is my code: <script type="text/javascript"> $(document).ready(function() { var table = $('#example'...
asked by 26.10.2016 / 23:23
1
answer

PHP error in wordpress when using the command use

I add a code that uses the following string in the functions.php file use Google\Spreadsheet\DefaultServiceRequest; And when I save the file it gives me an error: Parse error: syntax error, unexpected 'use' (T_USE) I use composer and the...
asked by 03.10.2016 / 18:28
5
answers

How to send data from a modal bootstrap dialog to a table in mysql?

I have a table in mysql called jobs that has three fields (Job_id, Job_Name and Cost) which has data and I show them in this table in html Now what I want is that when selecting edit, I can modify the name and the cost and that this cha...
asked by 05.10.2016 / 19:32
2
answers

Error Undefined variable: mysqli_query

I do not list my data in a table, I do not know if I'm failing to call the query. The error is: Error Undefined variable: mysqli_query Code <?php include ("db/conexion.php"); $query = "SELECT * FROM infraccion"; $result =$co...
asked by 30.03.2017 / 20:05
2
answers

Message history with PHP, MYSQL and AJAX

I'm creating a kind of Imbox, a chat so to speak but with the difference is that I do not want it to be a general chat, where all users write and it appears to all, so I made the system reserved between two users similar to facebook, it works wh...
asked by 18.02.2017 / 18:33