Questions tagged as 'php'

2
answers

Route control (URL) in PHP to execute API requests

I've been thinking for a while now about the best way to solve this and I do not come up with a satisfactory solution. I would like to exercise strict control over the routes that are introduced in an API that I am designing in my domain....
asked by 24.11.2017 / 16:17
1
answer

Perform update of later and previous dates

I have a table called TABLE_ENTREGAS with 4 fields id fecha_entrega fecha_preparacion fecha_facturacion Where fecha_entrega is a data already inserted I call it with a variable $fecha_entrega it contains a data in datetime:...
asked by 21.09.2017 / 13:28
2
answers

Error when entering the access system, the session is lost and data is recorded failed when entered correctly?

When the user enters correctly with the access data to the system, it registers in the database failed attempts in the following tables.    failed_attempt This table posts every failed attempt as a registered or unregistered user, all faile...
asked by 26.09.2017 / 06:41
1
answer

preg_match () does not extract all matches

I have this little PHP code: <?php $r = file("id.txt"); $content = implode(" ",$r); if (preg_match('#"name":[^"]*"([^"]*)"#', $content, $datos)) { $mp = $datos[1]; } else { $mp = 'error'; } echo $mp; ?> That is responsible f...
asked by 24.09.2017 / 05:33
1
answer

Search files in a folder with PHP

I have a folder with N number of files with different extensions, when I upload the file to the folder I rename it with a number, for example: 1.jpg or 4.docx or 7.pdf. I need you to list the file without knowing what extension it has, that is,...
asked by 25.12.2017 / 22:32
1
answer

Repeated rows in MYSQL query

Good I have a problem, it turns out that I have 3 tables that contain information about the event, another with the 'materials' (services) for that event and an intermediate table that generates me the N to N, when I want to show the event with...
asked by 21.12.2017 / 04:56
2
answers

Error showing list with PDO

Hello I'm trying to show a list which showed me with 'myslqi' now I'm working with PDO but I can not make it work the error that generates me I do not understand it. function listadoUsuarios(){ $db = new BaseDatos(); $db->conectar()...
asked by 14.03.2018 / 11:54
2
answers

Form works with GET but not with POST in the controller

I am working with Symfony 4 and I am trying to send a form by the POST method to a function inside a Controller, but I get an error saying that the Controller does not exist. If I send it by the GET method, everything goes well, that is, the pat...
asked by 25.12.2017 / 18:59
1
answer

Get the text inside the tag b

I have a chain with information of this type: $texto = "cualquiercosa<b>contenido</b>cualquiercosa"; $resultado = preg_split("<b></b>",$str) However, the result does not bring the text between the labels. Could you...
asked by 05.10.2017 / 00:32
4
answers

search textbox inside div

I have the following <div class="d1" id="div1"> <input type="text" class="t1"> <input type="text" class="t1"> <input type="text" class="t1"> <input type="text" class="t1"> </div> <div class="d1" id="d...
asked by 25.05.2018 / 00:04