Questions tagged as 'php'

1
answer

How to store the sum of the values that are entered in mysql and php

Good day! I commented: I have a table called "products" and I want to add the values that are entered in "$ amount" in a column that is called "$ total". This to keep track of the available stock. I have the following code: function agregar_to...
asked by 30.07.2018 / 12:41
1
answer

Why do I get this error?

I am making a validation in the Login and I get this error    Notice: Undefined variable: connection in   C: \ xampp \ htdocs \ Inventory Infrastructure \ php \ validar.php on line 14       Fatal error: Uncaught Error: Call to a member funct...
asked by 30.07.2018 / 16:05
1
answer

Do not edit record dependent on status

I make a ticket system which works for 3 states 1 = PENDING, 3 = FINISHED, 4 = CANCELED. My DB is modeled to be inserted by foreign keys. What I intend you to do is if the ticket is with status 3 = FINISHED, do not allow me to edit that t...
asked by 30.07.2018 / 09:14
0
answers

Send an input file by JQuery PHP

I need to send a form by JQuery using $ .post, the other input is sent correctly but the input file is not. This is the form: <form id="servicioNovip" method="post" enctype="multipart/form-data"> <input id="nombre" name="nombre"...
asked by 30.07.2018 / 16:09
0
answers

Save several files in zip with php

I have a site that downloads a DB to an excel file and they suggested that I do it with a zip file, so I was thinking about downloading each table in an excel file and putting everything in zip, this is the code with which I create the excel...
asked by 31.07.2018 / 20:40
1
answer

How to speed up the search time of a MYSQL with PHP

I'm doing some statistical graphs, which I extract from a table that presents 30,000 records and I will show them in graphics (HIGHCHARTS) ... it turns out that when I make the first query to complete the options of my select, it takes around 20...
asked by 31.07.2018 / 21:10
2
answers

PHP redirect to change session variable

I have to perform on a site, a functionality that allows that when you enter after the url, a / + currency, change the selected currency. The coins are set in a PHP session variable, so I thought about doing a htaccess redirect to a URL with...
asked by 31.07.2018 / 20:30
1
answer

MySQLi -insert_id returns value "0"

I have a management panel in which you can add even more administrators, but when I try to add them, I get an error. I have reviewed multiple times the data sent with die(json_encode($_POST)); and if all the data of the form arrive, but e...
asked by 31.07.2018 / 22:19
1
answer

Problems installing composer

I'm installing composer on my pc and it gives me the following error    The APP_DATA or COMPOSER_HOME environment variable must be set for   Composer to run correctly. I have xampp with version 7.2, but I do not know what environment va...
asked by 02.08.2018 / 12:18
0
answers

the javascript parameter is not recognized by the php query

function prueba(){ var prueba=2; // var usu=document.getElementById("usu").innerHTML; $.getJSON("json/ingresar.php", {prueba:prueba}, function(resulta){ var valor = JSON.stringify(resulta); valor2 = JSON.parse(valor);...
asked by 02.08.2018 / 14:06