Posts by UzumakiArtanis • 9,534 points
129 posts
-
4
votes2
answers1062
viewsQ: What does the data-reactid attribute mean?
I was looking at some websites, and I saw, in the source code of some pages, an attribute called data-reactid, embedded in elements div. What is this attribute, what is its function and what…
-
2
votes2
answers141
viewsQ: Handling and Error Handling
I want to know how the error handling should be done, correctly, for a non-compulsory variable, since if it is not informed, a Fatal Error - Undefined Index. Context: Through my system I register a…
phpasked UzumakiArtanis 9,534 -
11
votes4
answers650
viewsQ: In production environment should errors be disabled?
I saw that errors generated in production environment result in major problems, especially when you have an application related to money and/or passwords, but also due to the privacy of information.…
-
2
votes1
answer110
viewsQ: Send data to another page or send it to another page?
I wonder if it is better, for example, to have a form in which the action is set to another page, or if it is recommended to send the data to the page itself with the action="<?php echo…
phpasked UzumakiArtanis 9,534 -
5
votes2
answers1238
viewsQ: What’s the difference between using password_default and password_bcrypt?
Searching on hash, I noticed that the second function parameter password_hash, has two options, PASSWORD_DEFAULT and PASSWORD_BCRYPT, Exactly which of the two I should give preference to use? It’s…
-
1
votes1
answer72
viewsQ: Creation of Recursive Folders
The Problem: I wonder if there is a more practical way than using the control structures IF/ELSE for creation of folders recursively, based on the inputs that the user typed. Context: For example,…
-
9
votes2
answers395
viewsQ: Difference between Alter Table Foreign Key
I would like to know the difference between the execution in the clauses Alter Table when inserting the ADD CONSTRAINT , such as running the following code: ALTER TABLE Orders ADD FOREIGN KEY…
-
0
votes1
answer66
viewsQ: Set CSS button width to 100% when mobile
Hello, I would like help with a small problem, although it seems simple, I do not move much with CSS so I ask for help.I would like to set the width of my button when the site is accessed to 100% so…
-
0
votes1
answer619
viewsQ: Dynamic Combobox Information Filter
I would like to know how to make a dynamic data filter, to appear only the data related to the selected, for example: I have in my bank the table Empregado and Empresa, as an example I have: Staff…
-
0
votes1
answer253
viewsQ: Comparison of dates with strtotime
I have the following code: $data = date("Y-m-d"); $dataTr = implode(preg_match("~\/~", $data_vencimento) == 0 ? "/" : "-", array_reverse(explode(preg_match("~\/~", $data_vencimento) == 0 ? "-" :…
phpasked UzumakiArtanis 9,534 -
1
votes1
answer785
viewsQ: Unlink: No such file or directory
Hello, I was developing the pages and suddenly the following occurred Warning: Warning: unlink(upload/publicacoes/Empresa Demonstração…
-
1
votes1
answer468
viewsQ: What does it mean to say that an expression is short-circuited?
In the documentation PHP, about operators says: // foo() will never be called because all the expression short circuit. What does it mean to say that all expression is short-circuited? What happens…
-
2
votes1
answer141
viewsQ: Request with Ajax unsuccessful
Hello, I am making a request in Ajax, and there is an error where the value of the code of the line clicked (in a table) is not passed to Ajax, but I have another example that works perfectly and…
-
31
votes5
answers12535
viewsQ: Why is Varchar(255) widely used?
Why in various databases, say to set the size as varchar(255)? For example, in a field email why put varchar(255)? It would not be better (in question of storage and processing speed) to put…
-
4
votes3
answers287
viewsQ: Do you need to use the third bind* parameter?
I would like to know whether you should use the third value of bindValue() / bindParam()? For example: $resultSQL->bindValue(1, $email, PDO::PARAM_STR); Or there’s no need for me to use:…
-
1
votes2
answers1019
viewsQ: PDO Statement Dúvidas
I wonder if when I use the queries for SQL commands with PDO I need to use bind(): $SQL->bindValue(1, $email, PDO::PARAM_STR); // Seria algo assim? For example in this case: $searchSQL =…
-
4
votes2
answers790
viewsQ: What are Try/Catch blocks?
I would like to know what the blocks are try...catch. I would like more information in Portuguese, because in English I didn’t understand much, only that it would be a kind of if...else. What are…
-
0
votes2
answers45
viewsQ: Possible problems with logical operators
Hello, I wonder if you have any problem or will generate future failures, use the operator "!" this way: if (!(filter_var($email, FILTER_VALIDATE_EMAIL))): echo "<script>alert('O email…
phpasked UzumakiArtanis 9,534 -
1
votes2
answers666
viewsQ: Problems with Bcrypt password
In my script I use the bcrypt function (through a class), and I have the following problem: At the time I perform the last queries before login I need to make the query where the encrypted email and…
-
1
votes1
answer197
viewsQ: How to find out which folder the user uploaded?
I would like to know how to find out which folder the user uploaded to the form? For example, if the user uploaded from the folder X, if the file was inside the X folder, I would like to run the…
-
-2
votes1
answer1084
viewsQ: Update in the database via javascript
I need to make a button that when the user clicks on the corresponding row he will execute the following code without refresh: Line Code: mysql_query('UPDATE tbl_publicacao SET status = S WHERE…
-
3
votes4
answers1114
viewsQ: How to create multiple folders with mkdir
Hello, I would like to know how to create multiple folders at once, for example with that code: <?php $empresa = "Google"; $tipo = "Abertura"; $nome = "Contrato Social";…
phpasked UzumakiArtanis 9,534 -
1
votes1
answer88
viewsQ: Is there a way to join 2 queries of different tables in a single query?
I wonder if there is a way to join 2 queries of different tables in a single query? For example, in the code below I have 2 queries in separate tables. However, there is a way to perform these 2…
-
0
votes3
answers119
viewsQ: Create Page Loop 3 times
The user will enter the system, make another registration on a page not related to this question and will arrive on this page php.. On the page in question, it will register 3 different directors,…
phpasked UzumakiArtanis 9,534 -
-2
votes1
answer162
viewsQ: Change the field value dynamically
Hello, I would like help with my code, I wanted when the user clicked on the field with the magnifying glass: <a class="blue" href="#"> <i class="ace-icon fa fa-search-plus…
-
0
votes2
answers1059
viewsA: Return Database Data and List in Combobox
Resolution Code I used: <div class="profile-info-value"> <?php include "conexao.php"; include "executaSQL.php"; $link=conectar(); $busca_query = mysql_query("SELECT cod_empresa,razao_social…
-
0
votes2
answers1059
viewsQ: Return Database Data and List in Combobox
Hello, I would like to be able to return the values of the company table database and for each row that returns go creating an option in the combobox, I would like to know how to do this, I think…
-
3
votes2
answers1768
viewsQ: Dynamically Change Field
Hello, I would like to change the other field next to, in case it would be the name, I would type the name in the input and it would change the letters(type auto fill), and when the user selected…
-
-1
votes1
answer246
viewsQ: Rename image before upload
I want to know how to rename imgs before upload, because of security issues, it is good to rename with the date (I think), but if someone knows a better way please comment. <?php include…
phpasked UzumakiArtanis 9,534