Posts by Leonardo • 9,130 points
332 posts
-
-1
votes3
answers1281
viewsQ: Url friendly to MVC
I am trying to create a . htaccess to make the site urls friendly, the page display will always be on index because I am using MVC. I am following a pattern with the ato parameter in the url to…
-
2
votes1
answer340
viewsQ: Expand MVC structure and modularize by files?
I’m trying to understand the pattern MVC and created an example with CRUD users (with login), but I don’t know if it’s the best way I’ve created. Follow a few pages and the link to download the…
-
0
votes0
answers71
viewsQ: Create auto complete in input?
I want to do an effect of autocomplete in a input, as a prompt, example, I have the following commands in a array php: ADD SUB SHOW MUL I want to make sure that when he starts typing, for example…
-
20
votes4
answers4351
viewsQ: How and why use MVC in PHP?
I always made websites and systems without problem using structured PHP, came the curiosity if it is possible to make a system in OOP completely and if it is more advantageous. Searching I found the…
-
0
votes1
answer683
viewsQ: Swap select option according to option selected in another select
The Problem: On one page I have two select, one selecting the team and the other the team members, the first (team) I fill the option with php (per database query), so it will list all teams I have…
-
4
votes2
answers272
viewsQ: Query in two tables at the same time
I have for example the following scenario: Table Coluna01 Coluna02 Coluna03 book id name gender captl id name content cplivro id idcap idlivro When I have to associate a book with a chapter I use…
-
2
votes2
answers1404
viewsQ: Take another element’s background-color
It’s boring to keep changing the background color of various objects, I want to know if there’s any way I can define the color of an object and then just match the color of others with the color of…
-
1
votes1
answer145
viewsQ: Accesskey in Jquery
On one page I have several buttons with their respective accesskey (hot key for it), as I do for when this button is called by the key to execute the action click on it in Jquery. Example: I have…
-
0
votes3
answers1284
viewsQ: Compare accented letters with accented letters
I decided to make a mini hangman game just to not rust in php, I’m having problems with words with accents, example: apple. Initially, I take it from an array and separate it into an array, leaving…
-
1
votes1
answer1978
viewsA: How to add multiple phones to the same form dynamically?
Good made a quick example (better than complete your code and you do not understand). first I have a table telefone with id, nome and telefone: -- -- Database: `sistema` -- CREATE DATABASE IF NOT…
-
2
votes1
answer91
viewsA: What is the best way to write the following jQuery/Javascript code?
There’s not much to work with, it’s good - very readable - but in my personal opinion I don’t like to keep using variables, I spend a lot of memory. I would do so: $.ajax({ url:…
-
2
votes2
answers3956
viewsA: Session time of the user
I don’t see the need to record in banco de dados, use session variables only. Here’s a simple example doing this in 30 seconds: login.php <?php session_start();…
-
0
votes1
answer29
viewsA: stmt prepare me nothing appears to me
The code doesn’t look wrong, but there’s nothing to print on it. Try this way: <?php ini_set('display_errors', 1); error_reporting(E_ALL); session_start(); $db= new mysqli("host", "user",…
-
7
votes1
answer27033
viewsA: Clear fields with Jquery
Roughly speaking using the Submit() of the form on Jquery would be: $(function(){ $("#myForm").submit(function() { //no submit do formulário $('#myForm input').val(""); //coloca todos valores de…
-
5
votes2
answers181
viewsQ: Why in PHP string can turn function?
In the example I have a function named funcao, which aims only to display the value of the parameter on the screen. By creating a string with the function name and call it as a function, it will be…
-
-1
votes2
answers1141
viewsA: What code to search for available domains?
Well, the script was practically correct, I just took out the detailed results part and did a better check of the entered domain. There were problems with some entrances like: http://php.net, said…
-
3
votes1
answer2503
viewsA: Website in two languages
The simplest way I could find was by using the HTTP_ACCEPT_LANGUAGE that will catch the languages of browser, the first being the main one of the user. After this we rescued the translations saved…
-
1
votes2
answers959
viewsA: Jquery hover function in dynamic elements
The option, does not accept such customization, the solution would be to create a select from scratch, accompanied that question in the Stack Overflow I was able to implement something similar that…
-
0
votes2
answers555
viewsA: Activate function on another page after clicking anchor
I don’t know if I got it right, but here goes: 01.html: <body> <div> <a href="02.html?div=1" id="d1">Cor1</a> <a href="02.html?div=2" id="d2">Cor2</a>…
-
2
votes1
answer81
viewsA: How to use method_exist()
I didn’t quite understand the question, but here’s what function is and how to use it. The function method_exists() only checks if a method exists: Description: bool method_exists ( object $object ,…
-
2
votes1
answer269
viewsA: How to hide an input field from another page through javascript?
test.html: <body> <form action="test2.html" method="get"> <!-- FORMULÁRIO SEMPRE UMA BOA OPÇÃO--> <table border="1"> <tbody> <tr> <td><input name="opcao"…
-
1
votes1
answer1028
viewsA: Send data from a dynamic table via ajax
Well, I initially pulled some values from the code javascript that had not in the html, after that the code practically worked, I made adjustments not to spend variables etc: HTML: (I made small…
-
25
votes4
answers1768
viewsQ: What is the difference between ; and & in a URL?
I was watching a website to add in a C#application, I noticed a link similar to this: www.site.com.br/index.php?post=yes;user=1521; The parameters are separated by ;(semicolon). I accessed the same…
-
24
votes2
answers6309
viewsA: How to remove a CSS attribute with jQuery?
The simplest solution would be to reset the element: $.css("background-color", ""); // exemplo com background-color Example: $(function(){ var contador = 0; $(".btn").click(function(){ if(contador…
-
4
votes1
answer3451
viewsA: How to correctly divide a <th> into html?
I don’t know if it’s the best way, but I’d do it like this: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>TEST</title> </head> <body>…
-
3
votes2
answers322
viewsA: DIV only clickable if RADIO is marked
I’d be like this with the div: $(function(){ $("#bottaaoPA").off("click"); $("#bottaaoPA").click(function(){ if($("input[name='bbt']").prop( "checked" ) && $("input[name='resp'").prop(…
-
3
votes3
answers3134
viewsA: Add or Remove Class from a DIV by clicking
It would look like this (left over to class, you don’t see him changing the code HTML, but he adds): $(function(){ var contador = 0; $('.pacotes').click(function(){ if(contador === 0) {…
-
8
votes2
answers582
viewsA: Print two arrays side by side
The simplest way to do that would be with a for (that wouldn’t bring the arrays, but as I realized you just want to print them together), it would look like this: <?php // your code goes here…
-
2
votes1
answer4347
viewsQ: Manipulate page with Webbrowser
I’m having trouble sending values to a form via Web Browser. My goal is to make a post, IE, send the values to inputsof the form and do the submit from the same, after this open the page generated…
-
0
votes2
answers147
viewsA: How to pass data from a search done in ajax/php/mysql to a textarea with ckeditor
The question is vague, no code, etc. But I have worked with CKEditor and has no secret, check the following questions: 1 - Reference the archive js of the editor: <script…
-
2
votes2
answers290
viewsA: Secure Login with Remember
I’m sorry I was wrong about the previous answer, I couldn’t test, so I made a mistake. To change the settings of php.ini without editing the file use the function ini_set() (some hosting block such…
-
3
votes1
answer255
viewsA: Mysql result coming with bars
Just to leave a final answer... Just manipulate the string burst before saving it in the database, transforming \" in ' because HTML also interprets simple quotes. The simplest way is to use the…
-
2
votes2
answers57
viewsA: Print next days after 18/01/2016
<?php $today = getdate(); // pega data de hoje $raw = "{$today['yday']}. {$today['mon']}. {$today['year']}"; // string da data $start = DateTime::createFromFormat('d. m. Y', $raw); //formata a…
-
5
votes1
answer305
viewsQ: Monetize Unity 5 games on Windows Phone 8.X
How do I display ads in my game made on Unity 5 to the platform of Windows Phone 8.X?
-
7
votes1
answer305
viewsA: Monetize Unity 5 games on Windows Phone 8.X
To do this just follow the monetization steps of a common application of Windows Phone, we have two types of ads: Banner: A range of various sizes to be displayed constantly in the app.…
-
2
votes1
answer129
viewsA: Doubt about page width, None display and size (MB)
1 - Take a look over design responsivo, over the width, the ideal is 100%, always your page will have this width, but your content must have this width also to fill the whole area: width: 100%; 2 -…
-
9
votes4
answers5900
viewsA: How to receive form data with pure HTML?
Could do with javascript, but the parameter would be broken according to the characters contained in it by URL he will pass to string, but will format in link, removing spaces and accents: 01.html…
-
2
votes2
answers206
viewsA: Select does not work when clicking button
I looked deep into the code and it was full of error and bad practices: Starting on the form, where name="search" was in the submit when one should be in the input like text. Another mistake was to…
-
15
votes2
answers7197
viewsQ: Advantages of using Object-Oriented PHP? Where to use?
Lately I did a mini social media and practically did not use object orientation, except for one class I did for CRUD with PDO and ready-made Github libraries. Would this concept be applied more to…
-
4
votes2
answers758
viewsA: How to create dynamic columns with Bootstrap and PHP?
A simple example: <!DOCTYPE html> <html lang="pt"> <head> <!-- Latest compiled and minified CSS --> <link rel="stylesheet"…
-
1
votes2
answers417
viewsQ: Click elements below a div?
An example I can give: .noturno{ z-index: 9000; position: fixed; height: 100%; width: 100%; background-color: rgba(0,0,0,0.5); } <div class="noturno"> </div> <div class="corpo">…
-
3
votes3
answers630
viewsQ: Indications of use of cookies?
What would be the indication to use cookies? They would be a IsolateStorage web development, but so far I could not find an application for them, in a social media project I am working I used them…
-
0
votes1
answer98
views -
0
votes1
answer98
views -
1
votes3
answers328
viewsA: How to compare encrypted data with crypt
The error is probably not in the verification, but in the database, the column where the senha should be stored is probably set to a length pequeno thus truncando the generated encryption. I set a…
-
3
votes2
answers10363
viewsA: What is the command to close or quit the game created in Unity?
In the Unity, there are parameters like the Escape which are customized for the software to be really universal. You can see all the keys supported on Unity documentation. What would Escape be? The…
-
10
votes2
answers8715
viewsQ: What is the use of using foreign keys?
I’ve been learning about foreign keys and I’m having a hard time understanding what they’re useful for. Its purpose would be to "divide a table into several tables, leaving its data always atomic",…
-
2
votes2
answers150
viewsQ: Leave effect smoother and random
I have the following effect: .fundo { -webkit-filter: blur(1px); -moz-filter: blur(1px); -ms-filter: blur(1px); -o-filter: blur(1px); filter: blur(1px); width:500px; height: 300px; border: 1px solid…
-
1
votes2
answers4198
viewsQ: Do a string check?
At the event keyup of a input I want to verify the following cases: If string has letter and number "abc123"; If string is uppercase and lowercase "aBc"; If string has no numeric alpha character…
-
0
votes2
answers196
viewsQ: How to return a validated array to a form?
I have an application system step-by-step that would be step by step, ie first the user informs some data then others and others... I want to validate this data with PHP (because I have to query the…