Questions tagged as 'php'

3
answers

Create CSV file separated by commas with PHP

I am generating a csv file from MySQL with PHP / PDO. I put the header, generate the list but record them continuously. <?php require ('includes/config.php'); $BD = new ConnDB(); $archivo_csv = "saldos.csv"; if(!file_exists($archivo_csv)){...
asked by 24.10.2017 / 01:50
2
answers

Error in record deletion

I intend to do a record deletion from a table with php and javascript, but at the time of doing the deletion sometimes it does it and other times not This is the code of my button <button title="Eliminar Registro" id="delete-contrato-mo...
asked by 31.10.2018 / 16:05
2
answers

delete words in php when finding a -

I have the following data list of a WHILE in PHP <?php $query = "SELECT * FROM table where value='$thisvalue'"; $result = mysqli_query($conexion, $query); while ($row = mysqli_fetch_assoc($result)) { $camp...
asked by 11.10.2018 / 19:32
1
answer

Store a MySQL SQL Query in JSON

the query is the following I have this query: Edit > Added Query in PHP: if (!($resultado = $conexion->prepare(" SELECT facturas.*, renglones.producto, renglones.cantidad, renglones.precio_unitario, renglones.tot...
asked by 13.10.2018 / 06:25
3
answers

Query about PHPMAILER

I wanted to know if the PHP setup I'm doing for the submission in a form is well-armed. From what I read in the documentation I have to download two PHP files, the Class.phpmailer.php and the SMTP.php and link them the way I'm doing with a requi...
asked by 16.11.2018 / 20:45
2
answers

Problem CORS in Angular 2 and PHP

I have a REST server for queries to a database running in PHP , which via GET can be consulted several data in JSON >. Previously there was a client on another server written in Javascript + JQuery , so I needed to use CORS to conne...
asked by 14.08.2017 / 17:17
1
answer

Redirect to login in Laravel 5.4 if the token fails

When I'm on the login page for a while without activity and I try to login, I get the error TokenMismatchException and I know it has to do with the token that is in the access form and that being so long without activity the token become...
asked by 04.05.2018 / 16:43
1
answer

Relational data bases: problem when entering data

I'm trying to create a database where two tables have a relation to an intermediate table. The idea is simple; a table stores user records, their passwords, emails etc, while the other stores levels. (The levels belong to a kind of videogame...
asked by 02.04.2018 / 21:48
3
answers

Add total column and group by month in mysql

How do I add the total column and group by the column mes , but do not add me when the id_orden is repeated (218), and try to group them by month, and it looks like this: The sum of month 5 is 10 and the sum of month 1 gives 240, a...
asked by 17.05.2018 / 05:24
1
answer

Problem when printing data from a POO php constructor [closed]

I'm studying POO in php, and I've done this code, but when I run it, the page goes blank and does not show me the data I've entered before, any help? <?php class coche{ var $ruedas; var $color; var $motor; } function __constru...
asked by 26.03.2018 / 07:05