Posts by Glenys Mitchell • 401 points
30 posts
-
1
votes1
answer21
viewsQ: Find the next key of an array
I have an array that serves as a list of steps $Lista = ['a','b','c','d']; I need to find the next value after entering the current value. Example: I’m in step B I want the code to tell me the next…
-
0
votes1
answer42
viewsA: Change select field as registry without modifying list
Roger, I had to make some adaptations to the code to suit your need, and I’m still not sure. 'Cause the code is a little fuzzy. First: that in your select options load the same id id which is wrong,…
-
0
votes2
answers60
viewsA: Cookie is not being created
It is simpler to replace the <?php setcookie("Changed","Ok", time() + 172800, $path = "/"); ?> by a native function of the javascript language: document.cookie = "Changed=ok"; With this you…
-
0
votes2
answers38
viewsA: How to transform this query to lavarel?
Access Laravel documentation to learn more about the DB class Query There are many ways to do this, the simplest is with db select: $data = DB::select("select DISTINCT ( SELECT distinct…
-
-3
votes1
answer81
viewsA: Problem with PHP and wordpress version
If you don’t want to uninstall, you can use another local server like xamp. Anyway to not lose the banks, back up. Anyway, the problem is not the windows version but the version of your wamp, which…
-
0
votes2
answers88
viewsA: How to feed an array using data from another array in php?
In the new way of making an array we use $var = [] instead of $var = array() I suggest you study the subject on PHP manual Since your question is a little vague, I only made syntax corrections and I…
-
0
votes2
answers707
viewsA: Catch Value of input number
If you want to clear the special characters, knowing that by default js will not accept the same in this type of field, take advantage of the keydown event you have already done to return the clean…
-
1
votes1
answer50
viewsA: Open a Blank page with an image when clicked from the Database (PHP)
If you want to open the image on another screen, put the path to the image. Example: href="folder/image.jpg" target="_Blank" in your case, put the same that is in the image src inside the href:…
-
2
votes1
answer68
viewsA: Using URL variables in PHP code
It is good practice to validate variables before using them in production. In your case, just put one if and Else identifying if there is a value to be received by $_GET. Example with ternary by…
-
-1
votes1
answer34
viewsA: Create mysql table by php
Not used by quotation marks (at least in Mysql) in table name. Remove the quotes that will work. CREATE TABLE NOME_TABELA and not 'NOME_TABELA' CREATE TABLE $new_room (id int(255) NOT NULL, de…
mysqlanswered Glenys Mitchell 401 -
0
votes1
answer46
viewsA: How to throw controller errors and capture them in an Ajax - Asp.net Core MVC request
Puts a string inside the if at this point: [HttpPost] [Route("pessoa-gerenciar/change-forma-contato")] public PartialViewResult ChangeFormaContato([FromBody]…
-
1
votes2
answers113
viewsA: Is there only display inline and block by default in the elements or others?
There are many more, each supplying a different need. For example: Content, grid, flex, flex-inline, among others. They are considered more relevant because they have more time of use (older if you…
-
2
votes1
answer88
viewsA: Foreach List does not recognize array
There must be a simpler way to do it, but this way you’ll answer: $valores = '[1v4],,,,[5v3],,,[8v]'; //Post no seu caso $array = explode(',',$valores); //já que não vai usar a virgula, pode…
-
1
votes1
answer153
viewsA: Javascript - How do I pass a json object in my class constructor?
Magno, to pass parameters to the constructor of a class, all you need to do is instantiate it and within the parentheses add the parameter you want to rescue within the class, example: class Teste {…
-
1
votes3
answers74
viewsA: Checkbox "Cannot access 'checkBox01' before initialization"
Complementing Leandro’s response, you can use getElementById.value as well. let checkBox01 = document.getElementById("#checkBox01").value; let checkBox02 =…
-
-1
votes1
answer75
viewsA: PHP connection - Lumen
I believe your problem is to create a user with all the privileges in the bank, instead of using root. As much as your connection is local, your application requires the user to be default (root).…
-
0
votes1
answer69
viewsA: When submitting form, how do I see the result referring to the options chosen?
If this table comes with information from a database, I suggest you do it with jquery and post/get, this link has two examples: https://www.w3schools.com/jquery/ajax_post.asp If you don’t need this…
-
2
votes0
answers31
viewsQ: PHP Mail class does not load variables in the View
Laravel keeps returning me as an undefined variable, for the $bloger variable. I’ve tried every way I know how, but the mistake persists. I already loaded the view through the controller and it…
-
0
votes1
answer332
viewsA: How to access a class that is inside a folder in the Laravel vendor?
I couldn’t find a way to resolve this manually, other than by manipulating a file in a directory outside of Alavel. However I found this service on the web, already tested and works:…
-
-1
votes1
answer97
viewsQ: Jquery post with problems accessing a php class
I’m having trouble accessing a class via $.post from jquery. There is some internal error that is not shown in the console. If I instantiate the class via php, it works perfectly, just by jquery…
-
0
votes2
answers50
viewsQ: Redeem values from an array when the value is greater than x
I have an array that says, which seller and how many sales he made: array{ 'a'=> 1 'b'=> 2 'c'=> 16 'd'=> 4 .. } I need to know how many sellers have sold more than 4 products.…
-
1
votes2
answers90
viewsA: How to Shoot Pop Up after Copying Text
It’s quite simple, you create a div that will be hidden when the page loads: <div class='meu-css' id='div1' hidden></div> <!-- o atributo hidden esconde a div --> In the script:…
-
0
votes1
answer332
viewsQ: How to access a class that is inside a folder in the Laravel vendor?
I can’t access Spreadsheet class, it appears: use Illuminate\Database\Eloquent\Model; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; class Excel extends Model {…
-
-1
votes2
answers121
viewsA: How to return all content from a JSON?
You can count the number of houses that contains the array and then have them printed in a loop. See if this example helps you: if ($method === 'GET') { if (count($json[$path]) == 1) { echo…
phpanswered Glenys Mitchell 401 -
1
votes2
answers59
viewsA: Fill in a text field and turn it upside down in the format yy/mm/dd hh:mm
You could do it in a simpler way with jquery, or a scripting function. <html> <input type="date" name="data" id="data"> </html> <script> //exemplo com jquery…
-
1
votes3
answers38
viewsA: PHP integer value being modified for no apparent reason
@Lodi thanks for the help, in the comments of the manual I found this "solution". $agencia = "0736" + 0; In this way the decimal Octa is canceled and passes the value without the zero: 736; But then…
-
1
votes3
answers38
viewsQ: PHP integer value being modified for no apparent reason
Folks I’m having trouble with changing an integer number starting with zero. $agencia = 0736; $conta = 999999; $agencia = intval($agencia); $conta = intval($conta); echo($agencia); //resultado 478…
-
3
votes1
answer179
viewsQ: CONCAT is not working when column is NULL
I need help with the following code: UPDATE propostas SET obs = CONCAT(obs, 'aaa'), cd_status = 0 WHERE tsk_id = 1 If the column obs is null, does not load the new observation. Could someone help…
mysqlasked Glenys Mitchell 401 -
0
votes2
answers40
viewsA: Select does not load the options directly
I was able to find the problem, there were two requests in java/jquery that read select and this was making value NULL, I removed one of the requests and it worked.
-
-1
votes2
answers40
viewsQ: Select does not load the options directly
Good morning Guys Dev, since yesterday I came across a somewhat bizarre situation (if I may say so). I’m using php to load a select and bring the answer in a while: while($dados =…