Posts by AnthraxisBR • 4,361 points
185 posts
-
3
votes1
answer961
viewsA: Highchart chart importing table values from the database
First, this structure of your table, with two fields to identify the presence can be converted into a single boolean field. Table structure: ID | PARTICIPANTE | PRESENCA | DATA PRESENCA -> Must…
-
1
votes1
answer127
viewsQ: Replace default CTRL+F from browsers with a jQuery event
Where I have tables on my system, in almost all used the plugin dataTables to customize, but my plugin ta a little modified. In the modification in question, the search field inside the table is…
-
0
votes2
answers344
viewsA: Wave-shaped chart Canvas JS
You have several options for graphic generation, follow some popular plugins: Fusion Charts Highcharts Google Charts In the example I’ll give, will be using Fusion Charts (Because I’m more…
-
0
votes2
answers98
viewsQ: Read HTML inside a Sweetalert plugin confirmButtonText
I have an action originated by the plugin Sweetalert that needs a button with text well extended because it is a very sensitive option and can lead to errors. swal({ title: data['title'], text:…
-
1
votes1
answer916
viewsA: Update content of the HTML page with Javascript using SQL queried data
What you need is to define which element will receive the answer, and fill in. You can do it with pure Javascript, or with jQuery, as you said yourself you are a layman in JS, I recommend jQuery for…
-
2
votes2
answers64
viewsQ: Use 'today' as default value in PHP method
You can do something corresponding to this with PHP (use today’s date as default in the parameter)? class fiscalOBCharts { private $exercise; public function exercise(string $exercise =…
phpasked AnthraxisBR 4,361 -
0
votes0
answers112
viewsQ: Create an instantaneous modal, and Depóis destroy it
I have in my system many parts where the user double-click on a certain line, and is loaded the corresponding action within a Bootstrap modal. In the current method I use, there are three modal…
-
1
votes5
answers676
viewsQ: Individual methods or parameters in Mysql queries?
In certain parts of my system, some selection filters occur, an example, is when selecting the area of general sector collaborators, I can select: Employees (all) Active employees (status = true)…
phpasked AnthraxisBR 4,361 -
1
votes0
answers60
viewsQ: Call a class extension within the mother class?
I work with a kind of framework for HTML rendering and events, among other essential things, which is actually a standard HTML code generator because I can use either as a direct renderer or as an…
-
2
votes1
answer62
viewsQ: Demand that one method must be followed by another?
Let’s say I have a class with two methods, and the method x must be executed after the method y otherwise the method x must execute the method y to get the value default. class Classe { private…
-
3
votes3
answers2608
viewsA: Problem using include php different folders
Knowing your folder structure: / .../template/ .../cabecario.php .../tarefas/ .../tarefas.php .../css/ .../materialize.min.css index php. include 'tarefas/tarefas.php' php tasks. include…
-
1
votes0
answers182
viewsQ: Does typing in PHP interfere with an application’s performance?
Out of curiosity, and by using it a lot without knowing if it is necessary, define the type of the variable is something I do in 100% of my code. It’s usually defined by something like this: class…
-
3
votes6
answers2500
viewsA: Hover on DIV1 change DIV2 with CSS
Using the wrong markers, see this example: #pai:first-child:hover ~ #div2 { background: #999 } <div id="pai"> <div id='div1'>CONTEUDO 1</div> </div> <div…
-
2
votes4
answers216
viewsA: Create links with tags registered in the database
You need to break the string in a array, use the exploded method of PHP: Explodes: $arr = 'Alesso; Anitta; Billboard; Marshmello; Poo Bear'; $EXP = explode(';', $arr); foreach($EXP as $link) { echo…
-
0
votes0
answers490
viewsQ: Real-time form validation with php?
Assuming I have a form with some fields, and one of those fields is a CPF field. <input name="cpf" data-input-mask="cpf" data-input-field="cpf" data-input-validator="cpf" value=""…
-
1
votes1
answer82
viewsA: Create folders in Kcfinder
Inside the config.php file at the Ckfinder root you indicate a location with the chain of folders to be loaded in the "Backends block": $config['backends'][] = array( 'name' => 'default',…
-
0
votes1
answer871
viewsA: Bootstrap . Nav-pills active
Go through the elements 'li', remove classname 'active' from the previous, and set to the current. $(document).on('click','.nav-link',function() {…
-
5
votes1
answer240
viewsA: Pick up product id with Jquery
It’s not working because it’s not part of $(this), you have to navigate: var idStorage = $(this) .closest('.prodmostra') .find('.imagem-prod') .data('id-prod-carrinho');…
-
4
votes3
answers1421
viewsA: foreach - Browsing CSV archive
You need to open csv and go through array. See this example removed from the PHP site itself with a slight change: $row = 1; if (($handle = fopen("csv.csv", "r")) !== FALSE) { //Passagem pelas…
-
1
votes1
answer2171
viewsQ: Extremely slow and inconsistent composer
A few days ago I’m having a problem in my Composer that doesn’t make much sense (it doesn’t have a fault/standard logic, the errors are almost random), so I’m not able to solve, what happens is the…
-
3
votes1
answer305
viewsQ: Handle PHP native error messages/alerts
I have a mini framework to generate my elements, make js/ajax requests and interact with BD Mysql based on some patterns. I’ve been using it for a long time, but I want to increase it a bit and…
phpasked AnthraxisBR 4,361 -
0
votes1
answer36
viewsQ: Query about opening array form in PHP
Giving a read on arrays in PHP, I ended up finding some different ways to open an array, but in the end have the same destination, example: $arr = [ 'dado' => '' ]; Or $arr = array( 'dado' =>…
phpasked AnthraxisBR 4,361 -
8
votes2
answers776
viewsQ: Markup language equivalent to HTML?
Just for the sake of curiosity, I’ve been researching about and found absolutely nothing related. HTML is a text markup language, and there are others like XML which is the only one with a clear…
-
0
votes1
answer257
viewsQ: Database control (Mysql) in production environment
For a good part of my project I came working with git archive on a local server, (Debian 7), this week I migrated to gitlab, without any complication in the change, I changed only for portability,…
-
1
votes1
answer428
viewsQ: What is the best method to load JS files?
I try to work with the code in the way that gives me the greatest possible use of what was written, with this, for every feature that I will need to do in javascript/jQuery I control the individual…
-
2
votes1
answer87
viewsA: File Upload and Download - Open source
Take a look at this plugin: Ckfinder Apparently, this is the most complete, but it’s premium, what I use is Filerun, but it’s kind of boring to make it run: Filerun…
-
1
votes1
answer83
viewsA: Sitemap Mysql PHP divided into result quantities
If you run a counter no longer solves? <?php include 'conexao.php'; include 'acoes.php'; $sql = mysql_query("select nome, nota from aluno"); $a = 0; while ($string = mysql_fetch_array($sql)) { if…
-
0
votes2
answers227
viewsA: Function in jquery disabled button
Just compare if the element has the attribute 'disabled'. $(document).on('click', '.botao', function () { $this = $(this) if($this.attr('disabled') === true) { $('div').show(); }else {…
-
1
votes1
answer698
viewsA: jQuery input Mask plugin with strange problem
Solution: The problem was this: The 'keyup' event that instantiated the mask in the input, was responsible for restarting the pointer whenever it was fired, so when it remained tight it proceeded in…
-
1
votes1
answer698
viewsQ: jQuery input Mask plugin with strange problem
I have been using this plugin for a long time: Robinherbots/Inputmask And this week I made a change in the way I use it, I started calling it that way: Caller for the input: var mainValidator =…
-
0
votes2
answers685
viewsA: Git does not push to the master branch
SOLUTION: 1 - Create a new branch on the local pc and set. git checkout -b 'project' 2 - Request the push git push --set-upstream origin project From here, just use the command: git push…
-
0
votes2
answers685
viewsQ: Git does not push to the master branch
I was using . git normally in my project, yesterday I typed something wrong and git started sending me an alert from the corrupted index file. Okay, I did a git reset, I came back a commit and…
-
1
votes1
answer40
viewsQ: How to analyze javascript error in Firefox DEV response
Using firefox dev, there is the console (Ctrl+shift+k), and within that console there are answers, PHP error responses are simple, or when a variable is passed empty, but when it is a javascript…
-
0
votes2
answers390
viewsA: jQuery validate input characters
I make this validation a little different, take the event, and do the server-side validation. Example: $(document).on('keyup change', '.input-field', function () { var $this = $(this); var type =…
-
1
votes0
answers178
viewsQ: 100% dynamic website SEO?
I’ve never developed a website before, I’ve always worked with systems, so I’m having problems with what should be the easiest part of development, the HTML pages. I am in the middle phase of…