Questions tagged as 'php'

1
answer

Could someone help me find the error? [closed]

When I want to run my code I get this error:    Use of undefined constant - assumed '' <?php namespace App\Http\Controllers; use App\User; use Illuminate\Http\Request; class UserController extends Controller { public function post...
asked by 30.05.2017 / 11:01
4
answers

Insert data from a Postgresql Query to an HTML table

Good afternoon, I'm trying to make a table in HTML using PHP to establish communication with the database, the query is as follows $query1="SELECT b.nombreforense, b.apelldoforense, COUNT(*) AS Total FROM fallecido AS a INNER J...
asked by 11.04.2017 / 21:38
2
answers

Delete mysql log with php

What a good day! I'm working on a project and I see the need to delete files from a list, line by line, the detail is that for this to be effective, the record must also be removed from the database. Any suggestions on how to make that match wit...
asked by 16.08.2017 / 19:45
1
answer

SELECT does not work on a database with PHP

I'm trying to make a simple login. The idea is to look in the database for the user and password. The fact is that I have a SELECT that should take the rows with name and user that match those previously entered by the user. The...
asked by 24.08.2017 / 14:57
3
answers

What alternatives to cURL are there to make requests to an API in php?

Would anyone know a function similar to cURL to make requests to an API in php? So far I have used cURL to make http requests, but I was asked to investigate alternatives, for example in cases where you work in an environment that does not al...
asked by 20.02.2017 / 22:18
1
answer

Change Date Format - PHP

How could I change the format of a date that I receive by POST : 24/01/2017 (dd / mm / yyyy) to this format 2017/01/24 (yyyy / mm / dd)? $fecha1= $_POST['fecha1']; The detail is that when I insert it in MySQL I change the for...
asked by 24.01.2017 / 20:46
1
answer

Problem with an HTML / JavaScript / PHP form

I have a problem with an HTML / JavaScript form that is then processed and validated with PHP: On my site there is an HTML form, and the first label is a selection of multiple options, however looking with a bit of JavaScript I am trying to m...
asked by 03.04.2017 / 23:31
1
answer

Take Json data

I've been trying for a while to get the JSON of the API of League of Legends data and I can not find a way. I give the example of one of the JSON that I can not go. { "23385178": { "summonerId": 23385178,...
asked by 03.04.2017 / 19:47
1
answer

Heredoc PHP error: "Parse error: syntax error, unexpected end of file"

Reviewing a code, I found something in Heredoc notation: <?php $html = <<<XXX <script type="text/javascript"> ... </script> XXX; //must be begin in column 0 or ERR echo $html; Th...
asked by 23.04.2017 / 20:58
2
answers

Consume web service with PHP?

I need to consume data through GET and POST to a web service, this operation I have to do from PHP. My question is, what are the components that I need to be able to make this consumption? or any basic example of how this is done?     
asked by 26.04.2017 / 20:32