Questions tagged as 'php'

1
answer

How to validate the login without redirecting the page?

I have the following login form in a dropdown, my question is, how to do login validation without redirecting the page? Currently when the user informs a wrong password it is redirected to the login page and informs the error message. <...
asked by 11.03.2016 / 23:35
1
answer

PHP ERROR - Prepared queries [closed]

Good morning everyone, I'm starting in PHP, I follow a course through youtube. I'm studying prepared consultations. I have a form that does a query in the DB, however, when entering the data, the following error message appears:    Warning: m...
asked by 20.06.2016 / 14:36
1
answer

BD query without overloading the server

Hello everyone, good night! I need to perform several queries of an ID in an X table, but this is overloading my server and the connection with BD is off, I contacted my server and they informed me that they are trying multiple requests and s...
asked by 18.08.2016 / 02:39
1
answer

Transform class with static methods in interface

I have a custom class called ArrayList , which I created to handle objects in a small project of mine, but I would like to abstract it further by transforming it into an interface. This way, I could create other classes that do the same th...
asked by 25.11.2015 / 14:11
1
answer

Enable php error page

I have already seen several attempts to enable error pages in apache / php but none worked here. I have .htaccess and I have the following lines in it: ErrorDocument 400 /index.php ErrorDocument 401 /401.php ErrorDocument 403 /403.php Er...
asked by 28.09.2015 / 16:00
1
answer

Jquery + Angular form does not pass an input value

I'm doing a post with Angular. It works fine when I manually type the values in the form, however it gets a value via jQuery $("#id_veiculo").val(valores02.id); and this value appears correctly, but at the time of sending the value of thi...
asked by 19.09.2015 / 22:02
1
answer

PHP - Array - Vertical Keys for Horizontal

Situation I have an array as follows: Array ( [1] => Array ( [tree] => Array ( [tb_agenda_hora] => 2, [tb_agenda_fase] => 1, [tb...
asked by 12.06.2015 / 21:35
2
answers

How to increment the filename txt that will be created in php?

If it is possible, how to increment the filename txt in php? I am working with php that I know very little, I need to increment the name of a txt file, so that a new json.txt file is created whenever I send a file to the server. Does anyo...
asked by 12.06.2015 / 21:40
1
answer

What is more efficient, a complex query or treat the results?

I can do this: $sql = 'SELECT * FROM ' . 'data_companies ' . 'INNER JOIN data_companies_extra_infos ON' . 'data_companies.cod = data_companies_extra_infos.relationship'; $rs =...
asked by 20.10.2017 / 18:38
2
answers

Add matching information that is in different arrays in the same array

When the user has a submit in the form, I get the following arrays (In case I had 3 products in form, if I only have 1, in the 4 arrays I would only have index 0 if I had 5 products in the 4 arrays would have 0, 1, 2, 3 and 4 indexes) 't...
asked by 13.09.2017 / 13:29