Posts by MagicHat • 12,262 points
358 posts
-
1
votes1
answer311
viewsQ: WHERE clause with PHP-MYSQL array
I have the following code, but it’s not working and I can’t find the error. I need to display the 3 lines (123), which you find in $fetch['list_carac']. <?php include 'conect.php'; $sql = "SELECT…
-
-1
votes2
answers1139
viewsQ: PHP - Create a checkbox list dynamically
I have the following code, where I select categories from a MYSQL table. <?php include 'conect.php'; // array que conterá as categorias $cats = array(); $sql = "SELECT id_carac, nome_carac FROM…
-
1
votes2
answers4430
viewsQ: Foreign key - Insert table 1 ID into Table 2 PHP/MYSQL
Good afternoon, I am a beginner in programming and I have the following difficulty. I have 2 tables : CREATE TABLE produto( id_produto int(10) NOT NULL PRIMARY KEY auto_increment, nome varchar(45)…
-
0
votes3
answers121
viewsA: Help with CSS - Position Right and Left
Try that one... <!DOCTYPE html> <html> <head> <style> ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; width:100%; } li { float:…
-
0
votes2
answers116
viewsA: css shows error in chorme
Add that and see if it works. input { background-color: #CCCCCC; color: #000; font-weight: bold; -webkit-box-shadow:0 0 5px #666 inset; -moz-box-shadow:0 0 5px #666 inset; box-shadow:0 0 5px #666…
-
8
votes2
answers5108
viewsA: What is the difference between Logical Implication and Logical Equivalence?
The "Logical Implication" is established between two concepts or propositions, in such a way that the affirmation of the truth of one leads to the necessary inference of the truth of the other. It…
-
0
votes1
answer337
viewsA: Error parsing XML, row 3147, column 2: The Markup in the Document following the root element must be well-Formed
@Maria Santos, only with this passage it is difficult to give an exact answer, however it offers some elements that may be useful. First step to uncompromise this section of Javascript: Change :…
-
1
votes2
answers77
viewsA: How to Rewind an Ordered String List
Now I get papaya with sugar, then adapts to your need, see if it fits... <body onload="load();"> <div> <button type="button" id="volta" onclick="voltaPag()" value="volta"…
-
5
votes1
answer771
viewsA: What does @at-root do?
@at-root is a directive. It works for 'jump' from where you nestled in your Sass to a higher level. For example, you can use it like this: h1 { font-size: 16px; @at-root { header { margin: 0 auto;…
-
2
votes1
answer290
viewsA: Which regular expression would be more appropriate to validate a Cronjob expression?
Boss,simplex, it’s kind of like this ??? Well, I don’t know if I understand what you’re looking for, but... <fieldset> <legend>Valida cron:</legend> <h1>Formato</h1>…
-
1
votes3
answers4693
viewsA: Make Div appear 4 seconds after site loaded
Boss see if it helps: The function in question is the Javascript "setTimeout()". Depending on the effect you want you can customize. <!DOCTYPE html> <html> <body…
-
1
votes1
answer1550
viewsA: How to get xml data with php?
See if that’s what you need boss: <?php $xmlDoc = new DOMDocument();…
-
2
votes3
answers18768
viewsA: Regular Expression - Numbers only, no space
If it is exactly for this expression that says in the commentary, do so as it is. If you put the possible variables, which agent gets it right... "(\b[0-9]\b)/g" If it’s enough of the ok in the…
-
1
votes1
answer3306
viewsA: Fixed vertical menu with css and bootstrap
See if it helps. Following is in the basic css there adapts. In your case I think you will want to use images instead of the default list types. Then just replace it with list-style-image:…
-
2
votes1
answer624
viewsQ: How does the "Hover" event behave on "touch" devices?
I’m developing a website to suit devices through Media Queries, however I wonder, how certain events behave on touch devices. For example, how does the "Hover" event behave on touch devices? And how…
-
1
votes2
answers245
viewsA: Update table attribute, via Form <?php $PHP_SELF ? >
As stated by colleges in the comment, mysql functions should be replaced by mysqli functions. Regarding the error of your code alone is not an output function. Change to action="<?php echo…
-
0
votes1
answer221
viewsA: Custom registration of users in wordpress
Ali no user_pass tá null...and is saying in the comment "When a user is created, user_pass is expected... A string... And Null is returning in object form... Maybe a $_POST['Fieldname'], resolve...…
-
2
votes1
answer51
viewsQ: What is the procedure for entering 1 only 1 checkbox value in mysql with php?
In the research I have done on checkbox I have seen several alternatives for inserting checkbox values, using methods with array and loops. However I want to insert only 1, it is still necessary to…
-
2
votes1
answer1574
viewsA: Connection between Active Directory and PHP, how to do?
The code below has not been tested! To accomplish this task, you will need to observe the details embedded in the process carried out under the LDAP protocol. Enable the extension in the php.ini…
-
2
votes1
answer61
viewsA: Does creating your own tags affect anything?
There are several factors that interfere in the relevance of your page compared to others. Starting with the "Doctype" document type, which is the first tag to be parsed in text markup documents. As…
-
0
votes1
answer160
viewsA: Div overlapping even after clear both
You can try fixing your Ivs at the base. .final{ background-color: #000; color: #FFF; bottom: 0; } .base { background-color: #FCB412; border-top: 5px #FC0000 solid; border-bottom: 5px #FC0000 solid;…
-
3
votes1
answer152
viewsQ: Redirect login page does not match
I’m having trouble redirecting the user after login. I need help to find a solution. valida_user_login.php <?php $servidor = 'localhost'; $usuario = 'root'; $senha = ''; $banco = 'bd_'; //…
-
1
votes1
answer114
viewsQ: Is it essential to use the captcha in the form?
I’m completing a registration form, and I’ve taken some precautions against SQL Injection. And for the sake of aesthetics, I wouldn’t want to insert a captcha. The form in question is for…
-
1
votes2
answers382
viewsA: Detect stop() from Object Embed and return Alert()
Take a look boss: <script type="text/javascript"> function vidplay() { var vid = document.getElementById("Videobox"); var button = document.getElementById("btn_play"); if (vid.paused) {…
-
14
votes1
answer778
viewsA: What are error-correcting codes?
_(ツ)_/ Error detection and correction (Error Detection and Correction) What are and how error-correcting codes work ? Definition They are techniques that allow the delivery of data more reliably…
-
1
votes2
answers463
viewsA: How do I make the href that is inside my div work with Focus?
See if that’s it, boss: li{ display:inline:block; } .faq-content-answer { display: none; position: absolute; } .faq-content-answer a { display: block; } .faq-content-answer a:hover…
-
5
votes3
answers12017
viewsA: Difference between full and full binary tree
Kind of boss: Binary tree full : is a tree in which each node in the tree has 0 or 2 child nodes(or leaves). Binary tree complete : in a binary tree complete all levels except possibly the last , is…
-
1
votes2
answers1743
viewsA: How to register and query data in the Wordpress database?
Boss, try like this, get stuck, put in the comment, that agent advances... <?php //Suas informações $servername = "localhost"; $username = "root"; $password = ""; $dbname = "bd_"; // Conexão…
-
10
votes1
answer510
viewsA: What Regular Expression to parse a URL
In this case we are not checking a full URL, only what was requested, if it was a URL would be much more complex, even to ask the question... Try it like this boss : var str =…
javascriptanswered MagicHat 12,262 -
1
votes5
answers1479
viewsA: Input javascript text only
Boss uses regex, cool funnel too... function valida_az(){ var filter_az = /^([a-z]|\s)+$/ ; if(!filter_az.test(document.getElementById("input_az").value)){…
javascriptanswered MagicHat 12,262 -
1
votes1
answer93
viewsQ: Javascript - How do "IF and Else" work together with "Returns"?
I’m having a hard time understanding why sometimes, depending on where an "if" statement is inserted into a particular block of a function, it is ignored. And how to use the "retuns", when you want…
-
0
votes0
answers401
viewsQ: Javascript Focus() does not work on a particular code snippet
In this code I use several times the event Focus(), however in a certain stretch it is ignored, I would like to know why? The line that does not work is commented. function CriaRequest() { try{…
-
1
votes1
answer51
viewsQ: Javascript error, function stops working when I add another
The following code stops working when I add another almost identical one. Although the first part works perfectly, by inserting a continuation with similar logic not even the first part works. I…
-
0
votes2
answers53
viewsA: Error with PHP function
Behold: <?php include_once 'segurança.php';?> <nav id="barra_navegacao"class="navbar navbar-inverse navbar navbar-fixed-top"> <div class="container-fluid"> <div…
-
2
votes1
answer2959
viewsA: How to change the color of the link after the link was accessed?
Customizing your element through the selector :visited, in your style sheet. <!DOCTYPE html> <html> <head> <style> a.green:visited { color: green; } a.black:visited { color:…
-
1
votes1
answer699
viewsQ: Validate field with ajax and php
I am with a simple form, to validate if a name and email exist. function valida_nome(){ var filter_nome = /^([a-zA-Zà-úÀ-Ú0-9]|\s)+$/ ;…
-
0
votes1
answer608
viewsA: No way to keep input data after Ubmit?
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <form action="" method="POST" > <?php $user =…
-
3
votes3
answers804
viewsA: How to know if the database query was successfully performed?
Making a mix of solutions... <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <form action="" method="GET" >…
-
60
votes3
answers21803
viewsA: What is CGI and what is its purpose?
Common Gateway Interface CGI (acronym for Common Gateway Interface), in Portuguese , Interface Comum de Porta de entrada. Interface: element that provides a physical or logical link between two…
-
6
votes2
answers265
viewsQ: What is the procedure for debugging a "runstack", Javascript or Php via the Aptana browser or IDE?
When we develop a code, it runs on a stack of instructions. Is there any way, through the browser or an IDE, where we can track step by step the processing of the code, and see to what extent it was…
-
3
votes2
answers122
viewsQ: Run statement only if 5 conditions are true. Javascript
Which command should I use to execute an instruction only if 5 conditions are true ? For example In portugol : Se 1 +1 = 2 e 2 +2= 4 e 4 +4= 8 e 5 +5= 10 e 6 +6= 12 então faz isso. How do I do this…
javascriptasked MagicHat 12,262 -
3
votes3
answers168
viewsQ: Function calling other functions
I have a form and 1 function to validate each field of this form function valida_nome() { } function valida_email() { } function valida_tel() { } function valida_senha() { } <form…
-
1
votes2
answers133
viewsQ: Return div to previous style, after changing style, only with javascript
Code: function valida_form (){ var filter_nome = /^([a-zA-Zà-úÀ-Ú0-9]|-|_|\s)+$/ ; if(!filter_nome.test(document.getElementById("input_nome_cad").value)){…
javascriptasked MagicHat 12,262 -
2
votes2
answers75
viewsQ: Avoid successive getElementById calls with the same parameter
I have the following code: function valida_form (){ var filter_nome = /^([a-zA-Zà-úÀ-Ú0-9]|-|_|\s)+$/ ; if(!filter_nome.test(document.getElementById("input_nome_cad").value)){…
javascriptasked MagicHat 12,262 -
2
votes2
answers530
viewsQ: Validate different fields with different regex
function validaForm(){ function valida_nome (){ var filter = /^([a-zA-Zà-úÀ-Ú0-9]|-|_|\s)+$/ ; if(!filter.test(document.getElementById("nome").value)){ document.getElementById("nome").placeholder =…
javascriptasked MagicHat 12,262 -
0
votes2
answers304
viewsA: select field when opening javascript / jquery page
Use the Selected attribute. <select> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="vw">VW</option> <option…
-
0
votes1
answer213
viewsA: Align text horizontally to a diagonal div
See if it helps. #trap { position:absolute; z-index -1; float:left; margin-left:40px; width: 0; height: 0; border-top: 100px solid red; border-right: 40px solid transparent; } <div…
-
5
votes1
answer6629
viewsA: Create a login and password form in the upper-right corner of the screen
See if it helps. #nav{height:77px; width:100%;background: #f1f1f1;padding:7px;} #sup_direito{float:right; width:auto; } #login, #senha, #cadastrar{float:left;} <div id="nav"> <div…
-
0
votes1
answer64
viewsA: Javascript menu level 2/4 with error
See if this code helps you. <head> <style> body {margin:25px; font:11px Verdana,Arial; background:#eee} ul.menu {list-style:none; margin:0; padding:0} ul.menu * {margin:0; padding:0}…
-
1
votes1
answer285
viewsA: Fixed footer below a form
.geral{position:absolute;} .topo{ background-color:#495358; width:100%; height:auto; padding:20px; float:left; } .meio{ background-image: url('../images/background.png'); background-color:#000;…