Posts by Julyano Felipe • 581 points
39 posts
-
0
votes1
answer40
viewsA: How do I create a label of a given name within a <option> in a <select>?
It is possible yes as the example below: <select> <option title="testando 1">teste 1</option> <option title="testando 2">teste 2</option> <option title="testando…
-
1
votes1
answer27
viewsA: Calculate individual inputs with Jquery
Inside while, use classes with the same name: <td><input type='number' name='quantidade' id='quantidade-<?= $n ?>' min='0' max='9999999' readonly='readonly' value=".…
-
0
votes3
answers55
viewsA: Record form value and add to the database value
Never use the values directly in an sql, you should use the function bindParam() to predict SQL Injection. To update a value added to another, you can do it directly in SQL: $quantidade =…
-
-1
votes2
answers398
viewsA: How to clear shopping cart after checkout
From what I understand, you use the session to save the items in the shopping cart. So what you have to do is clear the session after inserting the sale: I believe that this is where the sale is…
-
0
votes1
answer103
viewsA: Pull value from a column with select mysql to php
You can use the JOIN so I can grab the spine empire of the other related table, thus being able to use this value resulting from the JOIN in the WHILE…
-
1
votes2
answers373
viewsA: How to change body color with onclick() from Buttons? Javascript
Following @Sam’s response, you can optimize your code as follows: function trocarcor(id) { document.getElementsByTagName("body")[0].style.background = id; } <main> <button id="blue"…
-
0
votes1
answer23
viewsA: I cannot access element (Child) but it exists (fullCalendar)
I arrived at a bizarre solution and, from what I realized, at the moment I was trying to use the find(), the element had not yet been rendered (I didn’t understand it correctly), I used the function…
-
0
votes1
answer23
viewsQ: I cannot access element (Child) but it exists (fullCalendar)
Using the function eventAfterRender I’m trying to access a child element that exists, but using the function find(), apparently not. Through the console, I can navigate to the child element as…
-
0
votes1
answer359
viewsQ: Regex - Remove between tag and class name start and last tag close
I have a string (html) and need to remove everything that is between the first occurrence of <div class="c and first tag closure > and last closure of "</div>". The first, it must be…
-
2
votes1
answer405
viewsA: Grab the array id within the session
You can "capture" that id as follows: foreach($_SESSION['linha_pedagio'] as $id => $objeto){ if($id == 0 || $id == 2 || $id == 5){ unset($_SESSION['linha_pedagio'][$id]); } }…
phpanswered Julyano Felipe 581 -
1
votes2
answers47
viewsA: Code does not display
To "print" the information, you must use the function echo, as an example: <?php echo $variavel ?> or else <?= $variavel ?>…
phpanswered Julyano Felipe 581 -
1
votes1
answer350
viewsQ: Show site pages on Google
I’m trying to show a "map" of the site on Google when searched, but I’m not succeeding. Using the plugin Yoast SEO, I configured all the pages of the site, but I did not succeed. When searching the…
-
0
votes3
answers505
viewsA: Run Mysql command when starting the system
The "solution" I found was to create a cron to run that command every minute. The other alternatives didn’t work (possibly because it was running before Mysql was running).
-
1
votes3
answers505
viewsQ: Run Mysql command when starting the system
Other commands I managed to execute when Boot in the OS normally in these two ways: 1 - Creating a file .sh in the briefcase /etc/init.d/ and put the command inside. 2 - Placing at the end of the…
-
0
votes1
answer34
viewsQ: SSL identification by Google
Yesterday I migrated the website to another provider and I won an SSL certificate, to which it has already been applied. I wonder if Google will automatically identify that the site is now safe…
-
0
votes1
answer97
viewsQ: Open site by Google gives error 500
When I open my site by Google search, it accesses the page and gives the error 500, however, when accessing the URL directly (the same url in another tab), the site opens normal. What is going on?…
googleasked Julyano Felipe 581 -
0
votes1
answer437
viewsQ: How to create this expression in C#
At first, the program I made the calculation using the following expression: valorComDescontos = valorTotal - (valorTotal * percentual); Where the valorTotal is a value assigned by the user (a…
-
2
votes2
answers250
viewsQ: Phpmailer alternative Gmail From
I have a website where there is a contact form. The email sent by this form (Gmail), I use a specific only for the site (formulario@....), however, when sending to the client, set the parameter From…
-
4
votes3
answers1870
viewsQ: Assign value to variable in method declaration
It is possible to assign the default value of a variable within the method declaration, the same occurs in the PHP? If yes, how? Ex: I want the test function, when called, if no parameter is passed,…
javaasked Julyano Felipe 581 -
0
votes1
answer87
viewsA: How to put a sum in my JS formula?
Under the line total += sub; you must put an if to verify which zip code and whether to increase the value. Ex: You must create a span with the id idTaxa or another for javascript to display later.…
-
7
votes2
answers7365
viewsA: How to know which version of the browser dynamically?
You can detect which browser is being used by the user as follows: Jsfiddle // Opera 8.0+ var opera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/')…
-
1
votes3
answers433
viewsA: My json returns invalid character in PHP
Another solution, if the aforementioned does not work, is you go through the object that transform your attributes into UTF8: for(x in objeto){ objeto[x] = utf8_encode(objeto[x]); } Edited Solution:…
-
1
votes2
answers293
viewsA: Insert in mysql with strtoupper not accepting numbers and letters
Another solution is to use the function mb_strtoupper() of PHP
-
0
votes1
answer54
viewsA: Objects in javascript
What you can do is create it in a JS file that is loaded before all others, and always loaded as well. So you can always use it. Ex: http://jsfiddle.net/BRWPM/1836/…
-
0
votes4
answers926
viewsA: How to use css align for tables
Try to use this: table { /*margin-right: 10%; /* distância até chegar em 100% (baseando-se no lado direito) */ margin-left: 100% !important;/* distância até chegar em 100% (baseando-se no lado…
-
2
votes2
answers1672
viewsA: Notification using PHP and Webservice on Android
It is possible yes, if you use a function in the Android application that is always run at a set time (every 1 minute, for example). This function should look up if Webservice has new notifications…
-
0
votes1
answer208
viewsA: Synchronize local app times via internet
You can use the following PHP function to change the time zone: http://php.net/manual/en/function.date-default-timezone-set.php…
-
2
votes3
answers593
viewsA: Move Cursor to Next Form Field
Translating a response from the self Stackoverflow: You will need to create a role onkeyup in the javascript and count the size of the value the user is passing. In this function, you will create a…
-
1
votes1
answer127
viewsA: Mysql Relationships: Query Problem
Take a look at the Cakephp documentation for associations between Models (I put the 2.x version because I believe it is your case) and see the examples of uses of Models associations, as well as the…
-
0
votes3
answers1284
viewsA: Compare accented letters with accented letters
As our friend user1811893 answered, there is no native function that does this. However, I will share the function I use. While its function removes all accents and spaces, the below also removes…
-
0
votes2
answers143
viewsA: How to create function for view?
Na Controller: Class UsersController extends AppController { public function esqueciSenha() { } } File name: forget_password.php
-
0
votes1
answer180
viewsA: Sep::Sort Cakephp array
I don’t have the reputation to comment on your question, so I’ll write here. Is this ordering that you want to do visual (for the user) only or does it have to be ordered in the array as well? If it…
-
1
votes1
answer35
viewsQ: Session from the Config
I have the following case: I want to send an email from cakephp, but since there is more than one user in the database (each containing a different email), I need to send each user’s email and…
-
0
votes1
answer69
viewsA: Error searching the database with cakephp-2
I used an alternative solution to what I wanted to do, it’s ugly but it solves the problem: public function qtdColaboradores(){ $sql = 'SELECT (SELECT cliente_id from registro_horarios m where…
cakephp-2answered Julyano Felipe 581 -
0
votes1
answer69
viewsQ: Error searching the database with cakephp-2
I wonder what’s wrong with my consultation. I am debugging it, and is bringing all the results of the Registrohorario model and not just one result per user, ie the parts of "Fields", "group" and…
cakephp-2asked Julyano Felipe 581 -
0
votes2
answers847
viewsQ: Generate PDF from filters in Cakephp
In a management page it is possible to filter by Company, User and between two dates. How to generate a PDF when the user clicks the button based on the filters used or then from the Database table?…
-
1
votes1
answer122
viewsQ: How to keep a controller item in static part of the page?
It’s the following guys, I have a page of the project that serves as a standard for all the others, a Layout.. However I wish to add an item (informative) in it, and it only remains on the home page…
-
1
votes1
answer65
viewsQ: Is there any way to "summarize" elseif’s?
In my Cakephp project, there are two dropdown fields to do a database search, both as string’s. I need to add two more fields (both dates). In the code below (controller), I used 4 if’s to check the…
-
2
votes1
answer132
viewsQ: Dropdown with "default" value and "all" option
Using Cakephp in my project, I created a dropdown to use to search the database by values and strings. I need to create an "all" option to search for all results and to be the "default" option of…