Posts by Erlon Charles • 5,352 points
161 posts
-
1
votes1
answer901
viewsA: PHP - Send to another client id page when you click on a cell
You can create a form in each cell and send each by POST the id customer’s echo '<td><form action="meuendereco/outrapagina" style="display:none;" method="post" name="post_' .…
-
2
votes1
answer936
viewsA: How to store and rescue Session value through jquery?
Php // Antes faça toda a declaraçao da sessão function getUserSession(){ return json_encode($_SESSION["user"]); } // Verifica se o login foi executado if($login){ getUserSession(); } Javascript…
-
1
votes2
answers794
viewsA: CSS: Character inside a round element
.borderRadiu{ border-radius: 5em; background: #660000; padding: 5px 10px; color: #fff; } <span class="borderRadiu">S</span>…
-
1
votes1
answer120
viewsA: Update error "Call to Undefined Function mysqli_sql()"
You are using a non-existent function mysqli_sql(). The function you should use is mysqli_query(), to php documentation shows the correct use of this function. So replace all the mysqli_sql() for…
-
2
votes3
answers167
viewsA: What is the meaning of this definition of values?
You are using a notation called JSON, to pass the gums to a médoto called init() of his perfBar. Definition of JSON JSON (with the pronunciation ['dʒejzən]), an acronym for "Javascript Object…
javascriptanswered Erlon Charles 5,352 -
3
votes3
answers433
viewsA: Sending external PHP variable to Javascript
You’re not putting the tag php in the check you are doing <script type="text/javascript"> $('document').ready(function(){ <?php if ($_SESSION['VALIDACAO'] == 01){?> var Texto = "Login…
-
1
votes3
answers5020
viewsA: How to make an inline form with bootstrap without using tables
There is an example of how to do this in bootstrap documentation <form class="form-inline"> <div class="form-group"> <label for="exampleInputName2">Name</label> <input…
-
1
votes2
answers228
viewsA: Calculation always active in Jquery
You can use the .change to check when these fields are being allotted and just display the result in a div or a span when the 3 have some value. Example: $(function() { $("#one, #two,…
-
1
votes4
answers685
viewsA: Error in JSON PHP return to AJAX
With the result of your log I came to the following conclusion. Your class.phpmailer.php is outdated and still uses a discontinued php function called preg_replace(). Details of the error <br…
-
5
votes2
answers2564
viewsA: Search for file in directory
Uses the function glob() for that reason. foreach (glob("00000000000*") as $file) { $user = $file; } Note that in the default definition there is a * which serves to define that everything that…
-
3
votes2
answers1784
viewsA: Take the line break in a file and put the content in a variable
Use the function file(), it reads the selected file to an array. $lines = file ('arquivo'); // Percorre o array, mostrando o número da linha que está foreach ($lines as $line_num => $line) { echo…
phpanswered Erlon Charles 5,352 -
2
votes2
answers1336
viewsA: How to transform input value into string
You can use .html() instead of .text(). In free translation the .html() : Fetch the HTML content of the first element in the paired element set or define the HTML content of each matching element.…
-
0
votes2
answers1108
viewsA: Grab the element ID when dragging and dropping
To catch the id of the item that was dragged you will have to use the ui which is passed in the stop $(function () { $("#items1,#items2,#items3").sortable({ connectWith: "#items1,#items2,#items3",…
jquery-uianswered Erlon Charles 5,352 -
4
votes5
answers3697
viewsA: How to import a variable within a function of a class?
Do main() accept a parameter. $valortotal = 15.00; class CreatePaymentRequestLightbox { public static function main($valortotal) { $pedido_total = $valortotal; This way you pass the direct value or…
-
4
votes1
answer10290
viewsA: Site Integration - Instagram API - PHP
I had a similar problem with my sites that used the Intagram api, I don’t know for sure why yet, but I started using this library to do the integration instafeedjs. Intallation <script…
-
6
votes2
answers1823
viewsA: Can I use Empty and isset in a variable?
Can! You are checking whether a variable exists and has some value. A variable in php can be initialized without value, so it can be initiated and have no value attached to it, so there are several…
phpanswered Erlon Charles 5,352 -
16
votes3
answers9925
viewsA: Difference between './', '.. /' and '/'
Having the folder structure down: Considering I’m in the file conteúdo.html and want to include the archive horas.html, as the two are on the same level folders so I should use: include…
-
0
votes2
answers53
viewsA: Form::Cakephp Helper
You can create a for popular one array, both in the controller as measured voi, and in the view as such: Thus: <?php $semanas = array(); for($i=1;$i<49;$i++){ $semanas["{$i} semanas"] = "{$i}…
cakephpanswered Erlon Charles 5,352 -
0
votes1
answer448
viewsA: Cakephp Passing Information Between Controllers
In the Cookbook you can see a method called loadModel(), with it is possible you use the Model of users within your controller books. Example: $this->loadModel('User'); $users =…
-
0
votes3
answers217
viewsA: Separate identifier information into variables (PHP)
This method below makes the parse in the string breaking it into array using the explode explode() then searches for which elements have the string you are looking for using the strpos() and then…
phpanswered Erlon Charles 5,352 -
0
votes3
answers277
viewsA: Element cakephp
You can get the name of the current page on $this->name (in the view); After that you create a array with every page where the element will not appear and does a check before calling the element…
cakephpanswered Erlon Charles 5,352 -
0
votes3
answers121
viewsA: Link to edit another window open
In the two articles listed below you will see how you can thoroughly explore the properties of the object window in Javascript Exploring the properties of the window object in Javascript Advanced…
-
1
votes1
answer348
viewsA: Cake php configuration
Error Missing configure the mod_rewrite from your apache server How to set up As can be seen in cake php documentation the configuration of mod_rewrite is done as follows. Apache and mod_rewrite (e…
cakephpanswered Erlon Charles 5,352 -
7
votes1
answer316
viewsA: What status can I return in an attempt to submit a form without a TOKEN?
On the basis of HTTP status code list and their descriptions I recommend. 400 - Invalid request (Bad request) 400 Invalid request (Bad Request) Order cannot be delivered due to incorrect syntax. The…
-
0
votes3
answers94
viewsA: Simple click on Jquery does not work
I’m not sure I understand your question, but in case you want every time span be clicked the open list if it is closed and close if it is open you will need to use the function .toogle() of jQuery…
jqueryanswered Erlon Charles 5,352 -
2
votes4
answers1483
viewsA: Release link after completing form
You can solve your problem only with an HTML5 attribute called required. <form id="formulario" action="http://meusite.com.br"> <label>Usuário</label> <input id="usuario"…
-
4
votes3
answers11551
viewsA: Removing characters with Jquery
The jquery does not have some basic rules that can be solved peacefully with javascript like data type conversions, data type identification, value rounding and string replacement. So you can…
-
2
votes2
answers137
viewsA: Save temporary data to the array or query the database
What happens if during the section a new client is removed or authorized for that logged in user? The way you are doing if the user never leaves the system he will never lose access or acquire new…
logicanswered Erlon Charles 5,352 -
2
votes3
answers14327
viewsA: Count amount of LI within a UL
You can use .size() to do this deed. var total = $(".rodapeUlCat li").size(); $(".rodapeCat").text(total); See the example…
jqueryanswered Erlon Charles 5,352 -
3
votes1
answer2967
viewsA: Break line into links
You can use the property word-wrap to manipulate word breaking p.test { width: 100px; border: 1px solid #000000; word-wrap: break-word; } <p class="test"> This paragraph contains a very long…
-
1
votes2
answers371
viewsA: "Controller method not found." in a method that exists
This action had to be routed in /app/controllers/route.php Route::get('purchases/edit/{id}', 'PurchasesController@getEdit'); With the inclusion of this line the error has been corrected and the…
laravelanswered Erlon Charles 5,352 -
0
votes2
answers371
viewsQ: "Controller method not found." in a method that exists
I’m starting with the Larable and on a project that was already underway. I’m trying to access the url http://mydomain.com.br/purchases/edit/1 and is always returning. Symfony Component Httpkernel…
laravelasked Erlon Charles 5,352 -
8
votes2
answers21131
viewsA: What does branch, tag and trunk mean?
Trunk Main folder, as in a tree the trunk, in it is the project that is stable and that will serve as a basis for new Branchs. Usually contains the most current project files as well as bug fixes…
-
9
votes2
answers11326
viewsA: Create HTML table using PHP
Just edit the html inside your php <?php echo '</table> <tr> <td>Nome</td> <td>Função</td> </tr>'; if($exibe['Nome1'] != NULL) { echo "<tr>…
-
1
votes3
answers757
viewsA: Problem with Return false in Javascript
In jquery there is a function called .preventDefault() which "denies" the original event of a tag HTML, this way you can use it so that your links do not have their original effect as soon as they…
-
4
votes2
answers1306
viewsA: Jquery Mask in dynamically created fields
A major flaw you’re commenting on is putting the same id in various elements with this foreach() in his php, ideal is that you replace it with a class. Php <?php foreach ($produtos as $produto) {…
-
4
votes2
answers2037
viewsA: How to set print options via javascript?
These settings are from the browser and not from the page. A while ago I researched a lot about the subject too and ended up solving the problem by setting these print settings as browser settings…
-
7
votes3
answers15042
viewsQ: What is the difference between BOM and BOM encoding files?
A long time ago I faced problems with formatting files between ISO-*, UTF-8, ANSII and others, I started researching ways to solve these problems, I found several different ways, both using tools…
character-encodingasked Erlon Charles 5,352 -
0
votes1
answer454
viewsA: Error while saving data
According to the Cookbook your data must be as follows to be saved Array ( [ModelName] => Array ( [fieldname1] => 'value' [fieldname2] => 'value' ) ) The problem is with the array where are…
-
0
votes2
answers82
viewsA: Remove array schedules if you do not meet a certain number of required periods
In order to calculate how many slots exist in the difference between one time and another you can use the time calculations Calculus $d1 = new DateTime("0000-00-00 09:00:00", new…
-
7
votes3
answers7634
viewsA: Error importing CSV into phpMyAdmin
Explanation of the problem Normally text files with special characters need to be saved in utf-8, similarly databases that store texts that also have special characters should be saved in the same…
-
2
votes3
answers1882
viewsA: How to use Fixed position within a div?
The position fixed does not fit very well to your need, the position that would best suit position:absolute, but I preferred to better organize your Css. To better understand how the positions you…
-
0
votes2
answers611
viewsA: Javascript array does not work on pie highcharts chart
Since you are using jQuery to generate the chart, also use it to do the parse json. your series will look like this: series: [{ type: 'pie', name: 'Quantidade enviados', data:…
-
3
votes3
answers9315
viewsQ: Sum results values in mysql
I am servicing a bank and am finding it difficult to make a select. Table structure descontos_taxas: id | value | client | data_created My Scenario: This table holds both rates and discounts in the…
-
18
votes4
answers6633
viewsA: What is the difference between pre and post increment in Javascript?
Preincrement See the example below: in the preincrement, first the variable c is incremented, and only then assigned to d: var c, d; c=6; console.log("Pre-incremento\n"); console.log("Numero sem…
javascriptanswered Erlon Charles 5,352 -
1
votes2
answers150
viewsA: Formatting JSON in cakephp
You need to format the array return of Cakephp so that json is presented in the correct way. In your case you need to descend a level on array. Leave your view as follows: <?php foreach…
-
10
votes3
answers4918
viewsA: Create table html and zebrar the same
The Nth-Child pseudo-class selects elements from a tree of elements referring to the specific position of each one. You can for example select odd or even elements. tr:nth-child(2n+2) { background:…
-
2
votes2
answers10853
viewsA: Calling the Javascript function of the parent file from within an iframe
To be able to call the methods, variables and objects of the parent page you need to use the window.parent. This way you can use this as if you were on the page itself as follows:…
-
1
votes2
answers799
viewsA: Fatal error: Cannot unset string offsets
You don’t need the unset() on line 283 of the archive app/Plugin/Uploader/Model/Behavior/FileValidationBehavior.php, the presence of offset 'error' will not interfere with the operation. The error…
-
2
votes4
answers9073
viewsA: What is the difference between using . js and .min.js files?
By and large an archive .min.js is ideal to be used in the production environment, because it is a minified file, that is, all identations are removed to reduce the physical size of the file, making…