Questions tagged as 'php'

1
answer

Save query in php

I want my query to be saved in php in this way var data = [ {nameusuario:IT01, dia:15, mes:9, axo:2017, IDsemana:1, cara:0}, {nameusuario:IT01, dia:22, mes:9, axo:2017, IDsemana:2, cara:0}, {nameusuario:IT0...
asked by 10.10.2017 / 15:11
1
answer

How do I create a dispersion chart with PHP? [closed]

I'm trying to create a table or scatter chart that shows the number of successful and failed logueos of a PHP form but after a lot of searching I did not find a tutorial or something to guide me. This is an example of what I'm looking for link...
asked by 04.10.2017 / 07:56
2
answers

insert an apostrophe before a query to excel

I have this result of a query $consulta .= '<td>' . $v . '</td>'; where the variable ' . $v . ' is a number that contains leading zeros, so that excel recognizes that number in text format, I must add an apostrophe 'befor...
asked by 31.08.2017 / 15:46
2
answers

IF conditional on jQuery

Good morning, The purpose of this code is to check if a record (number), sent through the form, exists in the database. The submit button (which is invisible) must be displayed on screen if it is confirmed that the record entered exists in th...
asked by 30.08.2017 / 05:00
1
answer

How you treat in JavaScript a data from PHP

I have a table where a cell contains an image, which when clicked will execute a function responsible for opening a box dialog with the image in big. <td style="width: 20%;"><?php $source = $row['T_IMG']; echo "<img width='5...
asked by 08.11.2017 / 07:36
2
answers

pass variables in Laravel

I'm starting to create a CRUD. In the index method of the controller I have put this: public function index(){ $productos=Producto::get(); return view('productos.index')->with('productos',$productos); } And in the index.blade.php...
asked by 08.02.2018 / 13:19
1
answer

How to verify field in MYSQL before doing UPDATE [closed]

I have a question ... I'm doing a service order system and the customer is given a secret PIN When the technician arrives, he must request the pin to change the status of the PENDING order to IN PROCESS. The PIN is in MYSQL How can I ch...
asked by 12.02.2018 / 09:57
4
answers

Browse associative array with foreach in PHP

I want to print the colonias array in a select by means of a foreach but it does not fit. { "delegacion":"\u00c1lvaro Obreg\u00f3n", "estado":"Ciudad de M\u00e9xico", "region":"Centro", "colonias":[ {"idcp":"27886","asentamiento":"...
asked by 23.10.2017 / 17:25
4
answers

how to pass value by href with php with get method?

I'm passing a value using href with php and get method but I think my syntax is wrong since it does not recognize me in the url this is my code $dni=09309393; echo' <label id="msjgd">EL PACIENTE SE REGISTRO CORRECTAMENTE EN LA PR...
asked by 06.07.2017 / 22:26
2
answers

Random elements of an array

I have problems with this code that I try to execute: $buscar = array("necesito 01","necesito 02","necesito 03"); $resul = $buscar[mt_rand(0, count($buscar) - 1)]; $query = array( "q" => "'+$resul+'", "count" =>...
asked by 07.07.2017 / 08:06