Questions tagged as 'php'

3
answers

Validate if there is a record in the database

I am trying to validate if there is a record in the mysql database by means of an alert with php but it does not generate that alert if (isset($_POST['numExp']) && !empty($_POST['numExp'])) { $consulta=$PDO->prepare("SELECT *...
asked by 24.06.2016 / 21:51
1
answer

Driver laravel moficar to search with more than one product

I have the following driver: public function show($id) { // Busco el perfil $perfil = lista::where('di', $id)->first(); //con el resultado de la busqueda muestro el perfil $mostrarperfil = Perfiles...
asked by 17.11.2018 / 16:19
1
answer

Doubt ascending / descending order

I have a form with which I collect the data in an array. $dato1 = $_REQUEST['nombre']; $dato2 = $_REQUEST['director']; $dato3 = $_REQUEST['año']; $dato4 = $_REQUEST['genero']; $dato5 = $_REQUEST['duracion']; $alumno = array("nombre" => "$d...
asked by 15.11.2018 / 12:14
2
answers

Get a particular data of a json from php

how are they? I ask you a question, I have the following code in php: function getCotizacionDolar(){ $ch = curl_init(); $headers = [ 'Content-Type: application/json', 'Authorization: BEARER eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJ...
asked by 23.09.2018 / 01:05
1
answer

Change CSV delimiter to comma in PHP

I have a small problem, I have a CSV file with a ; separator, the problem is that when I try to create the object with: $objReader = PHPExcel_IOFactory::createReader('CSV'); It returns the following error: is not recognised as an O...
asked by 14.03.2016 / 16:13
3
answers

I can not save the data in a mysql database

I'm trying to save data from a form made in php the codes are as follows. Registration form <html> <head> <title> Formulario de registro </title> </head> <body> <h1> Formulario de registro...
asked by 05.06.2016 / 03:52
1
answer

Pass a string with Datetime format to PHP time

I want to pass the content I have in an input with% co_from% to time, I tried it with strtotime but it does not give me the expected result. $fecha = strtotime($this->input->post("fecha")); It returns "0" when I want it to return the...
asked by 14.06.2016 / 11:18
2
answers

Problem with login

I'm trying to make a login with a database and PHP, which made progress and it seems to work, but lets me enter with any name and password. I set the PHP of the server to 5.6 and I think the problem is using mysql_real_escape_string in...
asked by 28.09.2018 / 09:07
2
answers

call attributes through multiple relationships and select multiple

I am relatively new working in Laravel, and I am learning on the fly, this time I'm stuck, and where I am I can not watch videos to try to solve the doubt that I have in these moments, hopefully they will ask me to help. I have a relationship...
asked by 28.09.2018 / 22:31
1
answer

DataTables warning: table id = dataTable - Invalid JSON response (resolved)

I have the following code where I make a query. include_once 'conexion.php'; $sql = "SELECT * FROM herramientas"; $resultado = mysqli_query($conn, $sql); if (!$resultado) { die("Error"); } else { while ($data = mysqli_fetch_assoc($...
asked by 31.07.2018 / 17:02