Questions tagged as 'php'

2
answers

How to execute a function in ajax when opening the page?

I have the following function in Ajax: $.ajax({ type: "POST", url: "tra.php", data: {}, dataType: 'json', suceess: function(Last) { line.originalData[0].push(Last); line.originalData[0].shift();...
asked by 31.10.2017 / 23:49
2
answers

SELECT AND UPDATE - Undefined index when submitting form

Hello I am building a content manager and I have a page where I return the results of the chosen country, so that I can then update each field. By choosing each country on the Paises.php page, I send the respective parameter to the edit pa...
asked by 11.09.2017 / 19:46
1
answer

Best way to filter (validate) data retrieved from a $ _SESSION

I am creating a registry and I have a session $_SESSION['usuario']['cpf'] ; I'm validating the data I get for POST and GET with the filter_input function of PHP. However, the documentation says: INPUT_SESSION (not implemented yet) . I...
asked by 14.09.2017 / 16:27
2
answers

Generate the current days of the week?

I need to generate the days of the current week from Sunday to Saturday and store them in a vector in the format dd/mm/aaaa , I have the following code to pick up the current week: $diaAtual = date('w'); $semAtual = date('Ymd', strtotim...
asked by 18.08.2017 / 20:39
1
answer

Put multiplication result in another input and add the totals

My goal is to display the sum of the Inputs in the Total Column in the "Total Order" input, where the Addition must also be added (it will be passed in decimal form (%)) and the discount value (will be passed in decimal form (%)). I tried to...
asked by 15.08.2017 / 09:37
2
answers

How to add items to an array correctly?

I'm trying to create arrays with days of the week. "Apparently" seems to work: $array_dia_da_semana = array("DOMINGO","SEGUNDA","TERÇA","QUARTA","QUINTA","SEXTA","SÁBADO"); $array_dia_da_semana_d = []; $array_dia_da_sem...
asked by 14.08.2017 / 18:57
1
answer

Upload Image along with text to Discord Using Webhooks

I'm trying to make a script that sends news, updates, to a Discord server, so I need to use the Webhooks system. I already mounted the whole system, everything is already working. But the system I just sent text, and I would like to make...
asked by 11.11.2017 / 17:58
1
answer

Ajax sending _POST without max character

In this ajax the post sends more than 1000 caracters: $.ajax({ url: 'inserir.php', type: 'POST', data: { inseason: document.getElementById('comment').value }, success: function(result) {...
asked by 11.11.2017 / 20:12
1
answer

Pass variable hidden in php page redirect

I've been doing a job and I need to finish php redirecting pro index along with a variable at the end of my login login. In the login I made a select where I returned the nickname of the user, now I need to send that nickname to the index in ord...
asked by 11.11.2017 / 22:01
1
answer

Stop database return - Mysql / PHP

I have a problem to finalize a project, I need to return the records of a database table, but in some registers, it has a data stored differently, so I need to stop the execution. I could not find the solution so far. What I need is to show a...
asked by 11.07.2017 / 23:16