Posts by Junior • 725 points
55 posts
-
-3
votes1
answer98
viewsQ: How to make Bootstrap Dynamic Tabs with Portable?
Goodnight I am trying to make each Tabs present a specific data referring to the name of a person who in my work would be the name of a teacher I have the following table diaries id -…
-
-1
votes2
answers337
viewsQ: Laravel 5.8 find with column name other than "id", how to do?
Good Morning In my controller to make the Show view work I have following code public function show($id){ $produto = Produtos::find($id); return view('produtos.produtosShow', array('produto' =>…
-
-1
votes1
answer179
viewsQ: How do you get inside the Modal as the data in the database leaves input checkbox (checked)?
On my Table in Products in my BD has the field Lawsuits and I made a modal so that the person marks the processes in which the piece may come to suffer, each letter corresponds to a process,…
-
0
votes2
answers2230
viewsQ: PHP Nfe 4.0, how to view invoice information?
I would like to view Nfe 4.0 on a PHP page, I’ve been studying a little and found several examples, but so far unsuccessful. index php. <?php $xml= new DOMDocument; $xml->load( "nfe.xml" ); if…
-
-1
votes2
answers76
viewsQ: PHP How to make a specific loop for each table?
Good Afternoon I have a table on MYSQL <?php $pesquisa = "SELECT * From tabelaProdutos"; ID / Código / Descrição / Qtd 1 /0001 / Caixa Azul 1/ 1 2 /0002 / Caixa Azul 2/ 3 3 /0003 / Caixa branca…
-
1
votes1
answer74
viewsQ: MYSQL, How do SELECT without grouping identical WHERE values?
Good Afternoon SELECT id, descricao FROM Produtos WHERE id IN ('1','1','2', '3','3'); But the result is id / descricao 1 / Caneta 2 / Lapis 3 / Borracha I wanted it to be according to the table…
-
0
votes1
answer123
viewsQ: How to display two different tables in the same view?
Using the Laravel 5.6 I am trying to display two different tables in the same view, but it is giving error this is my controller <?php namespace App\Http\Controllers; use Illuminate\Http\Request;…
-
-1
votes2
answers51
viewsQ: How to make the background image different for each day?
How to make each day of the week a different background image ?
-
1
votes2
answers130
viewsQ: PHP How do I multiply hours with the amount of times it will be repeated?
I have a table in my Mysql of time products, example: Table Processes id - description - time 01 - Drilling - 0:01:50 Example if I have to manufacture a part that has 5 holes, I have to multiply…
-
0
votes1
answer32
viewsQ: Echo does not return the image path in the HTML "style" attribute
I did the following echo"<div class='carousel-item active' style='background-image: url('img/intro-carousel/". $row["img_pag_princ_car"] . "')>" But the following is returning: <div…
-
0
votes2
answers37
viewsQ: How do I send an email form and change the DIV to another one with a message?
Oie I did next: HTML <div id="minhaDiv"> <form id="formulario"> <input type="text" name="nome" id="nome" autocomplete="off" placeholder="Digite seu Nome"> <input type="text"…
-
1
votes1
answer29
viewsQ: How to echo a select DATEDIFF?
I made the next code $data_restante = "SELECT DATEDIFF(CURTIME(),$data) AS date"; $result_data_res = mysqli_query($conn, $data_restante); $dado_data_res = mysqli_fetch_assoc($result_data_res); echo…
-
0
votes0
answers431
viewsQ: PHP Mailer 'PHP Parse error'
When using PHP Mailer it is returning me the following message PHP Parse error: syntax error, Unexpected '[' in plugins Phpmailer src Phpmailer.php on line 288 My code as below require…
-
3
votes3
answers457
viewsQ: How can I return zero in front of other numbers?
I have a record in my Mysql BD, example: A0001 and I need to take this value and go adding example A0001 + 1 = A0002. I did the following: $texto = "A0001"; $novotexto = substr($texto, -4); $soma =…
-
0
votes1
answer127
viewsQ: JS How to auto-refill an input with Javascript?
Hello I need to make a button that when clicking it automatically fills the input fields. HTML <button type="button" id="botao">Auto</button> <input type="text" id="nome">…
-
0
votes2
answers962
viewsQ: PHP multiply hour by integer value?
How do I multiply hours in the PHP? Example : $time = "0:01:00"; $mult = "5"; echo $time*$mult; The return was zero because it did not return 00:05:00?…
-
1
votes1
answer349
viewsQ: Return lower value of a SUM?
I have a SELECT with SUM and would like to understand how I do to return me the lowest sum of all value per supplier. SELECT distinct fornecedor, cliente, SUM(valor*qtd) AS TOTAL FROM orcamentos…
-
0
votes2
answers65
viewsQ: PHP update com for
UPDATED I need to update a table with input fields as below: <table style="width: 100%;"> <thead> <tr> <th>Item</th> <th>Código</th>…
-
0
votes1
answer1040
viewsQ: PHP Error Parse error: syntax error, Unexpected ';', expecting ')' when making an array foreach
I’m having trouble making an array foreach, is showing error, follow the code below: <table style="width: 100%;"> <thead> <tr> <th>Item</th> <th>Código</th>…
-
-1
votes2
answers689
viewsQ: PHP Error " mysqli_query() expects at least 2 Parameters, 1 Given", when sending multiple input information
I am making a page with registration of product values, I would like to know how I do a Insert Into of the values of a while? <table style="width: 100%;"> <thead> <tr>…
-
0
votes1
answer187
viewsQ: JS - Why does the modal window not work?
I have a modal that I took in Bootstrap, and I made a list of orders with my database, I made a code so that when opening the modal the person first choose an action and through the JS make appear…
-
1
votes1
answer53
viewsQ: How to ignore an empty row in a table
I am making a table and when a value is empty I would like you to ignore the value and be filled with the next row with value. With the code below, nothing appears, neither value nor worthless.…
-
0
votes1
answer1452
viewsQ: MYSQL How to delete a row from a table with dependencies?
Is it possible to delete a row from a table with dependencies? I tried the command ALTER TABLE MinhaTabela NOCHECK CONSTRAINT ALL But the error appears Error Code: 1064. You have an error in your…
-
0
votes1
answer371
viewsQ: PHP - is it possible to make an INSERT INTO with php variables and more SELECT?
I need to take information from another table and add it into another table with more information from a php variable I’ve been doing some research and some shapes I found was: INSERT INTO…
-
0
votes1
answer640
viewsQ: MYSQL+PHP, How to add items from different tables SUM()?
I have two tables: table_entries | id | descricao | quantidade | | 1 | Maquina Prensa | 1 | | 2 | Maquina Secadora | 2 | table_bom_entries | id | id_itens | codigo | quantidade | | 1 | 1 | mp001 | 1…
-
1
votes3
answers2084
viewsQ: How do I Reload only in the modal window?
I am using Bootstrap modal and wanted to close and open the new modal information be reset. I have a form within the modal, containing select, textarea, input. But when opening the modal from the…
-
-1
votes1
answer1405
viewsQ: How to fill in the inputs with the information returned from a query?
I’m testing the https://github.com/jansenfelipe/cnpj-gratis. He returns to me after the query the following information: array(21) { ["data_abertura"]=> string(10) "23/05/1979"…
-
0
votes1
answer183
viewsQ: PHP text that is changed in the <textarea> field when exiting the modal, the text does not return to the original, why?
Good Afternoon I’m using the Varying modal content based on Trigger button from Bootstrap to create a window to edit products. http://getbootstrap.com/javascript/#modals-Related-target I have a…
-
1
votes4
answers1464
viewsQ: Bootstrap how to print table background colors?
Good Afternoon I would like to print with bootstrap the colors I put in my table example: <td bgcolor="#000"> But when I print it changes to white background and black letters. I’ve been…
bootstrap-3asked Junior 725 -
1
votes4
answers2070
viewsQ: PHP, how do I stop when the number after . is 0 is hidden?
Goodnight I have a value example 100.00 and 100.30, in my table in my BD, as I do to give an echo when the numbers are 00 after the point get hidden example 100.00 show 100 and if it is 100.30, show…
-
0
votes1
answer134
viewsQ: How do I send a selected Data in SELECT2 by method=POST?
I have the following code: <label>Cidade</label> <select class="form-control select2 select2-hidden-accessible" style="width:100%;" tabindex="-1" aria-hidden="true"> <option…
-
2
votes1
answer122
viewsQ: Why is the second WHILE not working?
$consulta = "SELECT * FROM `teste` WHERE id='1' "; <div class="box-header"> <h2><?php while($d = $con->fetch_array()){ ?> <?php echo $d["cnpj_cpf_tab_clientes"];?>…
-
3
votes1
answer1285
viewsQ: How to list files in PHP with a specific name?
Good Morning I held the code below. <?php $diretorio = "../../arquivos/nest"; $ponteiro = opendir($diretorio); while ($nome_itens = readdir($ponteiro)) { $itens[] = $nome_itens; } sort($itens);…
-
2
votes2
answers1363
viewsQ: How do I save a txt in ANSI with fwrite?
When I run the PHP code below $arquivo = fopen("emails.txt","w"); while($dados = $cod_user->fetch_array()){ $bla = $dados['descricao']; echo $dados["descricao"]."<br>";…
-
0
votes1
answer300
viewsQ: How to save the fetch result to a txt and then download?
I have following code $arquivo = fopen("descricao.txt","w"); while($dados = $cod_user->fetch_array()){ $bla = $dados['descricao']; echo $dados['descricao']; fwrite($arquivo,$bla); How I choose…
-
1
votes0
answers110
viewsQ: How do I open an email link when logging in?
I am sending a link to a user, but as he is not logged in he directs to the login page, only when he puts user and password he goes to the main page of the php system, how do I make so that when…
-
1
votes2
answers59
viewsQ: How do I delete previous value using javasript
I’m trying to develop a selection of information, where in the end will form the product code, as the image below. But when choosing the fields it adds, but if you need to change, does not delete…
-
3
votes2
answers53
viewsQ: How do I fix Javascript to make it work before I choose an option in my select?
Hi I have my page code <select class="form-control" id="selected"> <option selected="selected" value="0">Selecione</option> <option value="a">MONTAGEM LATERAL</option>…
-
-1
votes2
answers155
viewsQ: Create PHP form using recovered result of an SQL query
I need to send what was entered in the input field and send by the POST method. My code is like this: <?php include_once("../controle/conexao.php"); //Recuperar o valor da palavra $usuarios =…
-
0
votes3
answers4152
viewsQ: PHP Parse error: syntax error, Unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING
I need to do a validation, if it’s true it goes to a link and if it’s fake it goes somewhere else. my code is following. <a href='<?php if($dado['st_nome'] =="FINALIZADO") {echo…
-
0
votes4
answers5899
viewsQ: PHP ask for confirmation before deleting
Hi In a course I’m doing the person did not teach how to delete a record in the first comics ask for a confirmation before deleting. So I made this code. <?php session_start();…
-
0
votes1
answer994
viewsQ: Table bootstrap, on mobile
I have a little big table I used this Bootstrap code. <div class="table-responsive"> <table class="table"> ... </table> </div> But in mobile only appears the first 3 columns…
-
2
votes2
answers309
viewsQ: MYSQL - Using SUM with Join
I have 3 tables Table Produtos with the columns id,descricao,peso. Table op_itens with the columns id_op, id_prod (chave estrangeira da tabela Produtos com a coluna id), qtd. I want to make a sum of…
-
3
votes2
answers419
viewsQ: Doubt with php database connection with mysql
I’m learning about php and mysql, I see several tutorials on the internet and one question that came up is, I see that create several variables and then put these variables in the command, example:…
-
1
votes2
answers222
viewsQ: Error with fetch_assoc, how do I correct? echo does not return desired value
I have following code I’m learning: $mysqli = new mysqli('localhost', 'root', '', 'mydb'); $sql = "SELECT * FROM ordem_producao WHERE op_id = $id;"; $query = $mysqli->query($sql); $resultado =…
-
1
votes1
answer420
viewsQ: How to open a new window to view data from a mysql table via php?
Well what I’d like to do is this, where I am learning php, I made the page to view registered users as name and email fields, and made a preview button that will call a new window with all user…
-
6
votes2
answers345
viewsQ: Values that can be entered as primary key
I have a company code of the product that is formed by two letters and 4 numbers (example: XX0000), it is advisable to use this code as primary key or create another column with code field and put…
-
2
votes1
answer93
viewsQ: MYSQL primary key is it possible to create an AUTO_INCREMENT fill mask?
I wonder if it is possible to create a primary key, aaa-0000 as a mask and still be auto_increment, aaa-0000, aaaa-0001, so on. If yes, how to do? Thank you
-
-1
votes1
answer504
viewsQ: How do I make a conditional formatting on my php page?
I have a table and would like to create a conditional formatting for when it appears certain text in the table, which are 5 these texts, (Beginning, half, end, canceled, awaited). change the font…
-
0
votes1
answer5960
viewsQ: How to view data from a foreign key table in my main table?
In PHP as I do to appear instead of the foreign key id, appear the field that has the data? My group table has the column id_grupo and column grupo_nome. I have product table there have the product…