Posts by Alexandre Cardoso • 186 points
11 posts
-
0
votes1
answer70
viewsA: limit number of categories of a php page
If you don’t want to limit in the bank (which is ideal), you can do with the. $lista = ''; for($i = 0;$i<=10;$i++){ $lista .= '<ul>'.$output.'</ul>'; } return $lista;…
phpanswered Alexandre Cardoso 186 -
0
votes2
answers184
viewsA: Return JSON php TRUE or FALSE
It was not very clear what you want, but if I understand correctly you can try to do this, so the value of $info["flDestaqueSite"] will be a string, true or false. $info["flDestaqueSite"] =…
-
2
votes2
answers156
viewsA: PHP does not recognize connection as parameter
Leandro good night. You created a class with a __Construct and a static method, and in this __contruct you passed your connection, but there’s a problem, when we use the static method we don’t…
-
1
votes2
answers105
viewsA: $_post returns empty, tried everything, guys. Please help me
The way you are doing it is as if you were redirecting to save it.php, the ideal would be to use ajax to recover this data, or using jquery or any other http client, like Axios for example. Try…
-
0
votes1
answer260
viewsA: How to create a request via GET
If it’s just a link you can use an id instead of a class, and you can also use the data attribute, see an example. <a id="detalhes" style="cursor:pointer;" data-id="<?php echo $res['codigo'];…
-
1
votes2
answers106
viewsA: When or how to integrate php code into html
php was created to be integrated with html, but nowadays the less direct contact the two have will be better, so think of the MVC standard using a template system, like Twig for example. I know…
-
-1
votes2
answers78
viewsA: PHP set path to a file
You can organize your project better, so you don’t need to use a superglobal. For example put inside the public folder index.php and also the folders with your Assets, so in your html it would look…
phpanswered Alexandre Cardoso 186 -
-3
votes3
answers143
viewsA: $_ has any meaning in question?
Whenever you find variables that start with $_ it means they are super global variables, that is, they are special variables that can be used in any part of your project, and each of them has a…
-
3
votes1
answer1051
viewsA: Check password hash on login (password_hash)
When you use password_hash you need password_verify to verify the password. The password_verify needs the first parameter the password entered by the user and the other the hash that is in the…
-
0
votes1
answer190
viewsA: How to receive and handle "IPN" notifications from PHP Secure Paging
Jheyson good night. I worked a lot with the pagseguro, and always when I needed to pick up the answer and save in a log I used the file_put_contents…
phpanswered Alexandre Cardoso 186 -
3
votes1
answer625
viewsQ: Taking data from Xios and vuejs
I have a very strange problem, I have the following code inside a component of Vuejs. I am developing a system where I choose the options through several checkboxes, and pass their id to that my…