Questions tagged as 'php'

2
answers

problems reading ajax array

What am I doing wrong? I am making a ajax request that returns me as callback this type of array or object [{"nombre":"Kabul"},{"nombre":"Qandahar"},{"nombre":"Herat"},{"nombre":"Mazar-e-Sharif"},{"nombre":"Otra"}] At the time o...
asked by 01.11.2018 / 01:41
2
answers

strtotime returns 1969-12-31

When the field Fecha is empty the variable $Fecha2 returns 1969-12-31 . When it's complete it works perfect. I leave this portion of code: <?php if(isset($_POST['Fecha'])) { $Fecha1=$_POST['Fecha']; $Fecha2= date("Y-m-d",...
asked by 26.11.2018 / 14:56
2
answers

Get php variable from another file

I have 2 PHP files. The first one is called data.php and it has <?php $get = $_GET; if (isset($get['getBoxes']) && $get['getBoxes'] == 'what-we-do') { $boxes = array( array( 'title' => 'e-commerce',...
asked by 07.03.2018 / 15:03
4
answers

Problem in laravel "Invalid route action: [App \ Http \ Controllers \ HomeController]."

Hello create a driver with PHP artisan make: controller HomeController --resource HomeController <?php namespace App\Http\Controllers; use Illuminate\Http\Request; class HomeController extends Controller { /** * Display a lis...
asked by 06.03.2018 / 18:01
2
answers

Function php meaning

I am using a code that I have been left with, but I do not know what this function means: return $a < $b ? -1 : 1;     
asked by 18.08.2016 / 10:08
3
answers

Value with various data like to find it in other pages in PHP

I have the following code pagina1.php <input type="checkbox" class="case" name="case[]" value="<?php printf("%s",$row["nombre"]); printf("|"); printf("%s",$row["fecha"]); printf("|"); printf("%s",$row["hora"]);?>"> I send it to...
asked by 12.10.2016 / 19:36
1
answer

divide chain separated by a comma and validate if it is the same

this is the code I have variable that I bring from the database $ profile ['image']; < --- in this variable I can bring several options for example: presentable,aseado presentable,aseado,De traje Presentable,aseado,uniforme so if for...
asked by 02.02.2018 / 19:26
2
answers

I need help with an elseif

I need help for this else if that does not register it well, I want to register an image in a modal but the one that validates it gives me error no sée if you need something special to validate it correctly because it gives me an error as...
asked by 28.09.2017 / 18:50
1
answer

Pass a list of objects from JavaScript to PHP

My code is as follows: function actualizarEstado(){ hi = Object.values(actualizaciones); window.location = ('actualizar.php?actualizaciones='+ hi); } <?php $actualizaciones= $_REQUEST['actualizaciones']; print_r($actualizaciones); ?>...
asked by 10.11.2017 / 16:00
2
answers

foreach PHP and HTML table

I am programming in PHP and MySQL and I want to fill a simple table HTML with a query. I have problems with foreach , this is my code: <table> <tr> <th>CODIGO</th>...
asked by 29.06.2016 / 22:25