Posts by João Victor Gomes Moreira • 1,968 points
70 posts
-
-3
votes1
answer28
viewsQ: Problems sending multiple lines in a form
$lista = $_POST['lista']; echo substr("$lista", 0, 28); ?> <form action="" method="POST"> <textarea cols=60 rows="10" name="lista" maxlength="500" wrap="hard" placeholder="coragem, você…
phpasked João Victor Gomes Moreira 1,968 -
1
votes1
answer977
viewsQ: After migration Wordpress downloads and displays no page
The problem is this, after migrating wordpress from one hosting to the other occurs a problem, it does not display anything just download a file called "download", I had this same error once but it…
wordpressasked João Victor Gomes Moreira 1,968 -
1
votes1
answer1242
viewsA: How do I make Jquery Mask not accept numbers?
I will try to make this answer very complete since this question is very interesting and I was looking for it myself a long time ago and I believe that other people will also look into it. In this…
-
10
votes2
answers12143
viewsA: How to change the Linux time by the command line?
I had made an answer, but it was change by terminal, my fault. Good to change by command line in SSH is very easy too. Change time (ex. 10 hours and 52 minutes: 10:00:00): date +%T -s "10:52:00"…
linuxanswered João Victor Gomes Moreira 1,968 -
1
votes1
answer62
viewsA: Problem with mysql
I know the problem has been solved but I’ll leave one more option and try to explain the first. urlencode(): Basically transforms white spaces into a sum signal +, is used more in search fields,…
-
0
votes3
answers13930
viewsA: Change color of an image by hovering the mouse over it
Seeing your comments I believe this is a way that will please you more since it is the most subtle of all and the lightest. It is very simple and uses Webkit from css, I made a test image just so…
-
0
votes3
answers47
viewsA: Problems with the positioning of an element
A simpler way is to use absolute and padding getting exactly like this: .right { position: absolute; right: 0px; padding: 5px; <div class="right"> data </div>…
-
1
votes2
answers134
viewsA: How do I delete the space that require_once leaves?
I believe that the functions can be used top and position to "reinforce" the position at the top of the page. I will give a small and simple example in the use of these functions, the example can be…
-
0
votes1
answer489
viewsA: how to make the photo gallery show a photo before clicking on it?
Your code is like this: <div class="localgaleria"> <script> function div_tr_gt(u) { var gth_y = 'url(' + u + ')'; document.getElementById('i-div-imgh').style.backgroundImage = gth_y; }…
-
5
votes4
answers39339
viewsA: How to apply readonly in a select?
First of all this is not an exact solution to your problem, it’s just a way you can use, an alternative way so to speak. Okay, but why is? Simply because it is a "gambiarra" and uses the element…
-
6
votes2
answers216
viewsA: Menu Centralized
Like I said in the comment, use the tag center of html is a waste of time, totally unnecessary and other things. We will organize all alignments by css. I’d rather not use ul li to make menu,…
-
2
votes2
answers179
viewsA: Build responsive menu with CSS
Using the Plugin Responsive-Nav this is done in a simple way and without using framework like Bootstrap. There are other options as well as the @Bruno tip @Hugo set the height of the class .…
-
1
votes4
answers3166
viewsA: Display error message when typing phone
To complement I will leave a more complete version of the reply from @Gabrielrodrigues. I did using the jQuery Mask plugin, I believe that increases the usability of the field since it is already…
-
0
votes0
answers33
viewsQ: Error while fetching data in MYSQL
I’m using PHP + MYSQL to make some queries in my database, this page in php is the same one I use on another host, there works normal though, when using on a different host it just doesn’t work.…
-
2
votes2
answers1258
viewsQ: Count values with specific data in MYSQL
I have a huge list of values that I need to count, the example is, I have 4000 barcodes and those 4000, 2000 are marked in the column out of stock with a yes. Better explanations In total barcode…
-
0
votes2
answers339
viewsA: How to use Highlight <button onclick=...>
If you just wanted the button to hold the selection if you didn’t click anything else the code would be this: I used functions On on the Divs and others can be added if necessary, I will show the…
javascriptanswered João Victor Gomes Moreira 1,968 -
0
votes1
answer30
viewsA: Limit rendering of images
I know it’s already been solved, but just to not leave unanswered if someone else also has the same problem, the solution is simple. In line 2 of your code, you will replace the terms: print…
-
0
votes1
answer445
viewsA: Change the background color of a JTEXTAREA text
To give a table effect, you will have to create a class that will inherit the DefaultTableCellRenderer and overwrite the method getTableCellRendererComponent You can do as in the example below, in…
-
3
votes1
answer5081
viewsA: preg_replace to replace spaces with dashes
The solution is very simple using preg_replace. If you just wanted to put the title as URL by converting spaces to hyphens, just add: $titulo_novo = preg_replace('/[ -]+/' , '-' , $titulo); But if…
phpanswered João Victor Gomes Moreira 1,968 -
1
votes1
answer110
viewsA: I need an if that changes the mask of an input
Using JavaScript, is very simple and increases the usability of a form. For example, in a register with several fields, a person will not waste time pausing the typing of the numbers to put traces…
-
1
votes4
answers2497
viewsA: How to dynamically change the color of the text based on the background color?
I believe that what you are looking for is clear reading of the text. Come on. We can do this using simple css and html, we can still add some basic fade effects that can be removed by deleting the…
cssanswered João Victor Gomes Moreira 1,968 -
11
votes3
answers508
viewsQ: What is a Kiddie Script?
I saw that term in a movie, Who Am I (Invaders in PT-BR), and basically what I understood is an attribution to the famous ctrl c + ctrl v. To better specify, what actions make a person be considered…
terminologyasked João Victor Gomes Moreira 1,968 -
40
votes1
answer9859
viewsQ: How is a programming language developed?
How a programming language is created? In general terms, where and how the validation of the functionalities of the new language works? For example, we have the C++ language, it is complex and has a…
-
3
votes2
answers2455
viewsA: Move to next line when reading txt file in Php
You can use the function fgets() to read line by line as in the example: $handle = fopen("nome do arquivo.txt", "r"); if ($handle) { while (($line = fgets($handle)) !== false) { // lê a linha }…
phpanswered João Victor Gomes Moreira 1,968 -
2
votes3
answers1151
viewsQ: Make it difficult to access CSS and JS files
I have on my website several files css and js and would like to hinder direct access to them, only I have no idea how I could do that. For example, in php it’s simple to do this, but how could you…
-
1
votes4
answers2812
viewsA: Sending email by PHP does not show accents correctly
The problem was solved simply adding utf8_decode() in the variables $_POST, that is, had no connection with the Content-Type or message body and not with file encoding. Currently with the solution…
-
1
votes2
answers76
viewsA: Change backgroud from one class to another event
How to do? Use JS embedded in the class itself Explaining Using the functions onClick, onMouseOver and onMouseOut it is possible to do Hover and Focus without using css. Code: <table…
-
0
votes4
answers2812
viewsQ: Sending email by PHP does not show accents correctly
Situation I have an email newsletter system, on it is sent emails to customers every day, but I realized that when using accents like ´~'^, the words disfigure getting like this: ÓAÃÃà forward.…
-
1
votes1
answer71
viewsQ: Adding Fields in the Body of a PHP Email
The problem is that I have a contact form, working all right, but I need it to contain more fields in the body of the email message. For example, I have some fields like company, phone, etc... I…
phpasked João Victor Gomes Moreira 1,968 -
1
votes1
answer699
viewsQ: Popup in PHP after return Success
I have a contact form, simple and I would like the person to send the message, if successful, appeared a popup saying that the message was sent. How could I do that? To help I’ll put part of the…
-
0
votes2
answers526
viewsQ: Contact Form Does Not Work PHP
I’m with a problem in the contact form of my site, I believe it is configured correctly but it is not sending the email through the form, I would like to know if it is error in the code, it is the…
-
-1
votes1
answer125
viewsQ: Problem with CSS ID Selector
My problem is this, I have a file css, in it there are 2 types of form, one for contact and another for another type of contact, however the forms They come into conflict, causing one to be…
-
2
votes2
answers298
viewsQ: Prohibit duplicate emails in Mysql using PHP
My situation is as follows, I have an email marketing system all in PHP and emails are added per file. CSV, but it is adding duplicate values and blank values. The problem is that, i have 1 table…
-
1
votes2
answers6895
viewsA: How to define "charset" of a table in SQL Server?
You will need to change the column setting to be NVARCHAR. to have Unicode support. I found a very interesting example on the internet to show how you can do this Code: USE Test GO /* Create Test…
-
2
votes1
answer4673
viewsA: Accented results in PHP turn to Symbols
Problem solved as follows: I believe by the use of echo the result would come out with a different page encoding, so I was told to use the tag utf8_decode($string); to encode to UTF8, echo by echo…
phpanswered João Victor Gomes Moreira 1,968 -
1
votes1
answer4673
viewsQ: Accented results in PHP turn to Symbols
I want to make it clear that I searched on the forum and in many other places about it, none of them solved my problem, so don’t mark it as duplicate because I believe my problem is specific. The…
phpasked João Victor Gomes Moreira 1,968 -
2
votes2
answers2095
viewsQ: CNPJ query using PHP
The situation is the following, I have a script in PHP that makes CNPJ queries by the site of Receita Federal, but it is returning me some errors, I don’t really know if they’re mistakes. HTML/PHP…
-
1
votes1
answer99
viewsQ: PHP Arrays and Strings Interface
Situation I have a page in PHP that does CNPJ searches and returns the values, but as it is without any formatting the results appear in forms of ARRAY and STRINGS. Example array(23) { [0]=>…
-
2
votes3
answers8946
viewsQ: Search ZIP by PHP Street
First of all, I need to search the zip code down the street, which means I don’t have the zip code and I have the address, I need to find the zip code by the address. So please don’t link this…
-
2
votes2
answers102
viewsA: Download extensive file on website
You can request the download by JS is very simple Code JavaScript function saveAs(url) { var filename = url.substring(url.lastIndexOf("/") + 1).split("?")[0]; var xhr = new XMLHttpRequest();…
-
2
votes1
answer655
viewsQ: Disable Debug Mode in Wordpress
Problem I have a template in Wordpress, which was working normally. At some point, without me changing anything, the following error started to appear at the top of the page: Debug Mode On Array (…
-
2
votes1
answer958
viewsQ: CSS file Only for a DIV, Is it possible?
Well, I’m probably going to take a negative vote on that question, so I’m going to try to explain as much as possible, ask you to try to understand and if you can’t, please ask. Situation I have a…
-
0
votes3
answers3525
viewsA: Brazil default date format does not work on bootstrap
Try to put this without changing anything, if it meets your needs, you will adapt in your use. <div class="well"> <div id="datetimepicker1" class="input-append date"> <input…
-
0
votes0
answers577
viewsQ: Upload PHP file that passes data to MYSQL
It will be difficult to explain what I want but I will try to summarize in 2 small paragraphs. Come on I have a script that passes the file data .CSV and .TXT to the database MYSQL, but it only…
-
1
votes3
answers323
viewsQ: Writing Div ID Makes Div Hidden Appear
I know the question is already confused, but the doubt is simple but I have no idea how I can do it, come on. I have a login system The person logs into this site There is the home page, on which I…
-
20
votes3
answers1686
viewsQ: Are there safer languages than others?
Are some languages safer than others? Or does this not depend on the language but on the programmer? The language in which a program is programmed interferes with its security, regardless of the…
-
-2
votes2
answers326
viewsA: Creating Navbar to Test Responsive Site
For whoever was or is looking for the same as me, here’s the solution: Chewed side menu code, for testing responsive website and templates. function set_frame_height(){ var head_h =…
-
2
votes2
answers326
viewsQ: Creating Navbar to Test Responsive Site
Hello, I find this question strange to explain, but I will try my best not to take negative vote haha, come on. Situation: I have a website, in it I present other website templates, I would like to…
-
6
votes1
answer23089
viewsQ: How to pass excel data to Mysql?
First, I have a newsletter system that I modified for email marketing, it’s all in PHP (obvious) and first, I add the emails manually through a part of the site add.php but there are over 3000…
-
0
votes2
answers1063
viewsA: How to load a JS image
Try the following: var values = [ {"OrderID": "Santo André", "Endereco": "Rua Bernardino de Campos, 171", "Bairro":"Centro", } function image() { var img = document.createElement("imgspan"<img…