Posts by Victor Eyer • 1,508 points
76 posts
-
0
votes2
answers174
viewsA: Run SELECT command in Firebird database with Javascript
Sequentially is for sequential readings. You should also call next(). A simple JSON.stringify() should do it. So your code would look like: firebird.attach(options, (err, db) => { if (err) throw…
-
0
votes1
answer310
viewsA: Pass parameter from one Page to another React Native
According to the documentation itself, you are doing everything right when submitting the parameter, the error is time for you to catch it. In the documentation, when passing a parameter, you should…
-
1
votes2
answers126
viewsA: execute a javascript file when the user accesses a Node route
Just import the function of this file and call on its route. Example: const minhaFuncao = require('./minhaFuncao.js'); app.get("/", function(req, res){ minhaFuncao();…
-
1
votes1
answer921
viewsA: Create a loading(spinner) in an asynchronous request with React
Following the comment made by Vinicius: You create the loading state, and start it with false. Immediately before making the call in the API, you change the state to TRUE, and when the request is…
-
3
votes1
answer114
viewsA: How to add two input text fields?
Well, you took the typed numbers and then you put the .textContent I don’t know why. They were already in number form because of the Number() Apart from that, I added so that the sum would be shown…
-
0
votes1
answer38
viewsQ: Error to replace characters
I have to create a function to make the exchange of some character. This is the exercise: 1. Build a function that receives a message, its size and a character and remove all occurrences of that…
casked Victor Eyer 1,508 -
0
votes1
answer39
viewsA: Unexpected value when averaging two numbers
When you do Nota1 + nota2, you are concatenating these variables, rather than summing them. To solve, just use the parseint() var alunos = document.querySelectorAll(".aluno"); for (var registro = 0;…
javascriptanswered Victor Eyer 1,508 -
1
votes1
answer78
viewsQ: User with browser cookies disabled
I have a system and use cookies to temporarily store information, but I noticed a problem with a certain user and when trying to solve the problem, I noticed that the cookies disabled (do not ask me…
-
0
votes1
answer63
viewsA: HTML - Buttom separation
Well, I made an example with jQuery just so you’d have an idea of how you’re going to do it. I commented on jQuery for better understanding. Logic used by clicking the button, it stores in a…
-
2
votes3
answers208
viewsA: String Jquery or JS
Use the split javascript itself oque = "o que é física nuclear"; significa = "o que significa física atômica"; cortaOque = oque.split("é")[1]; console.log(cortaOque); //saída: física nuclear…
-
1
votes1
answer158
viewsA: Search registered users and show same page
Your mistake is here <?php $nome=$_POST['cxnome']; $pesquisa=$_POST['pesquisar']; ... ?> When you do this, you are assigning the value of $_POST['cxnome'] a variable, of which $_POST['cxnome']…
phpanswered Victor Eyer 1,508 -
0
votes2
answers36
viewsA: I need a php variable to be placed in a href link
If you’re putting html echo in php, consider doing so by concatenating: <?php $fa=$aux["celular"]; echo '<a href = "https://///////////phone='.$fa.'&text=">CLIQUE</a>'; ?> If…
-
2
votes1
answer263
viewsA: Problem with return message in form with Ajax
Consider adding a e.preventDefault(); instead of Return false and also put it in the first instance In your html, you weren’t closing the tag <form>. Also, your form ID <form…
-
1
votes1
answer75
viewsQ: Take value from right set with 'ambiguous' fields
I am making the following query to my database: $escalacoes = 'SELECT * FROM escalacoes AS e JOIN jogador_rodada AS jr ON e.id_jogador = jr.id_jogador WHERE e.rodada = ('.$rodada_atual.' - 0) AND…
-
3
votes1
answer36
viewsA: Form does not reach the database
You are specifying 9 fields to receive the information, but you send 10 information: $formulariojobs = "INSERT INTO formjobs (nome, nasc, tel, gen, ende, esco, exp, sobre, vaga) VALUES ('$nome',…
-
1
votes1
answer35
viewsA: htaccess returns $i
Switch to that: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] RewriteRule…
-
2
votes1
answer89
viewsA: Remove images that are not present in the database
I had the same problem as you. I have a code made by me ready in PDO and Mysql, I will leave here for your logical basis. I will try to explain as much as possible. (I will not include lines of code…
-
2
votes2
answers3134
viewsA: Center <label> in the center of the screen
Just put one text-align: center; in div with id "bar" which results in the way that! div#bar { background: #424041; font-size: 25px; border-bottom: 1px solid #f1f1f1; text-align: center; }…
-
0
votes3
answers312
viewsA: Could help me count the number of characters in a word in PHP
As you said yourself, you could use Empty(): For every existing position he adds '1' on the counter <?php $palavra = "abacaxi"; // 7 letras $i = 0; while(!empty($palavra[$i])){ $i++; } echo $i;…
-
0
votes2
answers190
viewsA: Alignment of all checkbox on the right
Just add a "float: right; that everyone will be on the right. html { font-family: tahoma; font-size: 16px; padding-left: 3px; } form { width: 600px; margin: 0 auto; } fieldset { border-radius: 5px;…
-
3
votes4
answers1275
viewsA: Check file size (all) with Jquey
The value in the comparison must be in bytes. In your code, it’s 10000. That is, 10 thousand bytes is equivalent to only 0,01 MB. I changed the value to 5000000, which amounts to approximately 5MB…
-
1
votes3
answers46
viewsA: Changing position of multiple DIVS with same selector in Jquery
I made the function very simple and put the explanation commenting on the lines of codes. But in short: 1. Counts items with "price-to-view" class on the page; 2. Each of these elements is placed…
-
1
votes1
answer135
viewsA: Identify all links on a site and change it with java script
Well, I made a simple code with javascript. I’m getting all the elements "to", taking your links, cutting them and concatenating with the "/seulink/" Although I did take the elements "to" recommend…
-
1
votes1
answer231
viewsA: Avoid double clicking and redirect to another page
Your Return false prevents the form from being sent, so simply remove it: $('.form-disable').on('submit', function(){ var self = $(this), button = self.find('input[type="submit"], button'),…
-
0
votes1
answer528
viewsQ: Validation of Jquery/Ajax/PHP fields
I read some questions here on sopt, but I couldn’t find what I wanted. I made a basic validation with ajax and jquery that is working, but there is an unforeseen. Are two camps: email and team. HTML…
-
1
votes1
answer250
viewsA: Insert ID from one table into another
Very common mistake. I make a lot You forgot to put the 'echo' <input type="hidden" maxlength="6" name="id" value="<?php echo $row['id']; ?>">
-
1
votes1
answer63
viewsA: Contact Form - Sending date 0000-00-00
Use the "date_formate" of php itself! $data = $_POST['datadenascimento']; $data_cria = new DateTime($data); $data_formata = $data_cria->format('d/m/Y'); Read more here…
-
3
votes1
answer247
viewsQ: Show codes for user
Hello! I have one forum and, in publications of my users, they can add codes to display them using the bbcode tag [code][/code]. I’d like to know how to make stylize the code, as it happens here in…
-
0
votes1
answer433
viewsA: I wanted to validate two input fields with one button
Well, the downside of validating with javascript is that if your players are a little bit clever, they can see the source code of the page and see the numbers. Well, but the solution is easy! You…
-
6
votes2
answers3042
viewsQ: Increasing/decreasing number effect
I searched the Sopt and I couldn’t find what I wanted Suppose I have one button and, when carrying out a click, he alter the value of some div or input. The initial value is 1, and to the click on,…
-
0
votes1
answer67
viewsA: Pass the $rfprod parameter by clicking on the line for a PHP program (POST Method)
If I understand correctly, you want that when the user clicks on the item, its reference code is sent by POST. Beauty. First I’ll make some modifications to your current code: <div…
-
0
votes1
answer127
viewsQ: Update contents of a. load()
I wonder if it is possible to update the contents of a load. Example: I have a form on the page "html submit." <form action="submeter" method="post"> <input type="text" name="nome" value=""…
-
3
votes3
answers1191
viewsA: Show BD record without refresh
Using ajax On your page where you have the button, enter the following code: $("#idDoBotao").click(function(){ $.ajax({ url:"adicionar_consulta.php ", type:"POST", data: ({}), //Como não está…
-
0
votes1
answer4059
viewsA: Error connecting database (Fatal error: Uncaught Error: Call to Undefined Function mysql_connect() in )
Functions of type mysql_* have been removed in PHP7. You probably have the PHP7 version. mysql_* functions are obsolete. The recommendation is to use MYSQLI or PDO. SOLUTIONS TO YOUR PROBLEM…
-
0
votes1
answer150
viewsA: htaccess with friendly url not working(?)
I usually use the following RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteRule ^noticia(|/)$ noticia.php RewriteRule…
-
1
votes1
answer868
viewsA: How to apply sessionStorage or localStorage in code
I used sessionStorage yesterday on a project of mine. I will make it for you in a very simple way. To put a value in sessioStorage, we use sessionStorage.setItem('nome', 'valor'); and, to take this…
-
0
votes1
answer1165
viewsQ: Draw system
I am intending to make a draw system on my website. I read some questions (including one that I liked very much that was this one) and I noticed people saying that X Cities could never be drawn,…
-
1
votes2
answers141
viewsA: Database data by days of the week
First, take today’s date. O using the date(), it generates the days in English (Sat, Sun, Mon...), so I will use an array to form: <?php $data = date('D'); $semana = array( 'Sun' => 'Domingo',…
-
2
votes1
answer564
viewsA: how to hide subfolders from url through . htacess
A quick solution RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^site/view/Mi00OTI/golbolaver(|/)$ site/product/view/Mi00OTI/golbolaver Read…
-
2
votes1
answer39
viewsA: How to take a selection of a <input type="image">?
This is an Outline. Appears when the element receives :Focus Solution: CSS textarea:focus, input:focus{ outline: none; } Source: "Source here"…
-
1
votes1
answer2240
viewsA: Div full screen with Bootstrap?
Hello! Just use z-index! In your loading class, put a higher value and in the navbar class, put a lower value, with ! Important CSS: .navbar, .navbar-fixed-top, .navbar-defeault {…
-
3
votes2
answers845
viewsA: HTML & PHP -Make a log in button log out
Exchange the "Member Area" for something like: <?php if (isset($_SESSION['email'])) { echo "<a href='logout.php'>Log out</a>"; } else { echo "<a href='login.php'>Member…
-
1
votes1
answer545
viewsA: How to remove beep from windows application
Try this on your application //Desabilitar beep SystemParametersInfo(SPI_SETBEEP, 0, nil, SPIF_SENDWININICHANGE);
-
3
votes1
answer1175
viewsA: How to style elements that already contain bootstrap class preset style?
Hello. You have assigned the panel-title-blue class to a div, and within that div you have an H3 with another class. Soon, that H3 will respect his class first, and then his father’s class. Then the…
-
0
votes1
answer1927
viewsQ: Animations of input text and Divs when scrolling the page
I have seen that it is getting more and more common this practice, where the elements of the page will "appear" (fade-in, slide-in, and more) automatically when, when giving scroll, you enter a new…
-
0
votes2
answers196
viewsA: Login Form
Your files need to be on some server (may be local) that has php support. What is occurring is that you are opening the . html file by the browser (right button -> open with the browser). In the…
-
0
votes1
answer130
viewsA: Use user-friendly URL without folder navigation
I must assume you’re using $_GET, then just insert this into your . htaccess: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php…
-
0
votes2
answers73
viewsA: How to make a database search appear in a table?
Hello. I no longer recommend using Mysql, since it is obsolete and is discontinued. It has also been removed in version 7.0.0 of PHP. But as the question was asked about Mysql, let’s answer it! In…
-
0
votes3
answers582
viewsA: Problems with image on the site
This will cause the entire div to be filled by the image. imagem antes, não parece nada <div class="jumbotron text-center"> <div…
-
-1
votes2
answers102
viewsA: Php file that creates html, how do I get the information to come from the database?
The file using mysql will look like this: <?php # Nome do arquivo html $pagename = "pastatest/paginahtml.html"; # Texto a ser salvo no arquivo $selecionar = "SELECT * FROM tabela"; $conectar =…