Posts by MoisesGama • 704 points
25 posts
-
0
votes0
answers31
viewsQ: Array for table problem with column
all right? I’m having trouble converting this Array to an HTML table. [1] => Array ( [column] => Diagnóstico [date] => 30/08/2021 [content] => TESTE 1 ) [2] => Array ( [column] =>…
phpasked MoisesGama 704 -
5
votes4
answers251
viewsA: substr only with string greater than 4 character
Try to do it this way: $conta = "ABCDE"; echo strlen($conta) > 4 ? substr($conta, -1) : $conta;
phpanswered MoisesGama 704 -
2
votes1
answer627
viewsQ: Generic Parameter Friendly URL . htaccess
I’d like to ride a URL user-friendly with generic parameters, ie that receive any parameter in any quantity or file. Today I rode the .htaccess so that the file name becomes the URL. File I am…
-
1
votes1
answer99
viewsA: Mysqli Prepare with Loop for Select
With the help of @rray who suggested putting the while within the for and some adjustment came to the result I desired. Follows the SCRIPT so I can help someone with the same problem: if( $teste =…
-
1
votes1
answer99
viewsQ: Mysqli Prepare with Loop for Select
I’m trying to make a SELECT using MySQLi and PREPARE in a FOR but not working. Always returning a single zero. Application Code: if( $teste = $mysqli->prepare("SELECT COUNT(*) AS TOTAL_CONTATOS,…
-
3
votes2
answers836
viewsA: Pop-up gallery of images
If you want to equal what is being used on this site is the FancyBox one plugin in JQuery. This link has all the instructions on how to use and the files to download. http://fancyapps.com/fancybox/…
-
0
votes2
answers943
viewsQ: Index in Wordpress Subfolder
I’m riding a hotsite on php in subdirectory where the installed WordPress. But by accessing the folder you’re giving me the error 404, being with a index.php normally. I searched and could not…
-
6
votes2
answers188
viewsQ: SQL Query Optimization in Mysql and Index
Guys I’m having a performance problem at a consultation SQL in the MySQL who is using my server a lot, I’ve done index and yet consumption does not decrease. The query I’m using is: SELECT CONCAT(…
-
3
votes4
answers2897
viewsQ: Verifies which variable is with higher value returning the variable not the value
I would like to know how to return the variable of larger number but not the value and yes which is larger. For example: $valor_01 = 6; $valor_02 = 4; $valor_03 = 3; $valor_04 = 9; $valor_05 = 8;…
phpasked MoisesGama 704 -
0
votes0
answers107
viewsQ: Select Advanced separated by hour
I rode a SELECT to return some information from my table separated by time and date. Until this part is all working correctly. Now I need him to select the same data only from another date, being…
-
1
votes3
answers371
viewsA: error while creating table with Foreign key mysql
set FOREIGN_KEY_CHECKS=0; on the line before the CREATE TABLE IF NOT EXISTS tbnoticiasrel with that he will not check the FOREIGN KEY
-
1
votes1
answer706
viewsA: Fade in fixed menu scroll div with jquery
Before giving a fadein you need the element not being displayed. I made an example directly in your code, follow the link BOOTPLY I hope I’ve helped.…
-
2
votes2
answers42
viewsQ: Doubt Mysqli Parameter new_link
The old PHP function mysql_connect possessed the parameter new_link which allowed connection to several different banks in the same script: Example: $connect =…
-
2
votes2
answers1001
viewsA: Receive information from the database and send to the form field
You must echo the attribute value of your input with calling the desired dice. Script for example: <form action="#" method="get"> <label>Nome Cliente</label><br /> <input…
-
5
votes2
answers2726
viewsQ: Send Whatsapp message by link on the site
I would like to know how to send a message by a link to a certain number. I have already managed to Android, but for iPhone doesn’t work. Link: <a…
-
1
votes2
answers920
viewsA: Problem with PHP login/logout
Come on, your code contains several problems. But I’m here to help ;), first the file validacookies.php not necessary, delete it. I rewrote their Scripts putting some functions and a better logic…
-
0
votes1
answer28
viewsA: Alternative to padding-nevative in table
What you need to reset the heirs within the tags. I advise you to study more CSS These are basic things. See the example below: tr, td, p { padding: 0 !important; margin: 0 !important; border: 0…
-
2
votes1
answer3702
viewsQ: Control the return button evendo from the browser
I’m using the function in jQuery onbeforeunload but it is being activated by browser back (Back Button). I would like to know how to control the event back from the browser, I have tried several…
-
0
votes2
answers2835
viewsA: Send html page variable to another page using javascript
I’m going to spend something that will change your life with JavaScript and a Script in jQuery to create Session with this you can pass your variables and much more via JavaScript by the website.…
-
3
votes3
answers866
viewsA: Image with horizontal hr centered vertically in half
Iae I would only do with CSS, without using images and using absolute. Run and see the result. Of course you can change as you wish. Follows the Scritp: div.baseLogo { position: relative; width:…
-
6
votes1
answer396
viewsA: Logic error in PHP when constructing if elseif Else
Your mistake was simple, you didn’t put the $ of variáveis at the time of the if and elseif . Script correct: <?php $ok_post = false; $ok_captcha = false; echo "ok_post = ", (int)$ok_post; echo…
-
3
votes2
answers1331
viewsA: Check separator type in a CSV file
I got a solution and I’ll leave it on record in case anyone needs it. I created a function to check the file delimiter, follow the script complete with the reader of CSV: <?php function…
-
3
votes2
answers1331
viewsQ: Check separator type in a CSV file
I rode a script for import of CSV with PHP but I’m having difficulty with checking the type of formatting CSV. I need to check if he’s separated by ,or ; or \t or : or |, but I’m not getting it.…
-
1
votes1
answer92
viewsQ: Optimization of SQL Query
I set up a series of SQL but I’m having difficulty generating something that stress less the server, I ask help from you. Follows the SQL: SELECT '2015-06-10 00:00:00' AS 'Hora', COUNT(id_contato)…
-
-1
votes1
answer191
viewsQ: Open Modal in Tab Closure
Hello, I would like to open a modal window the moment the user tries to close the browser and ask if they really want to quit. I know I could do this with beforeunload, but I wanted to control in…