Questions tagged as 'php'

2
answers

Date Comparison - PHP [duplicate]

I have the following comparison: # Verifica se está em tempo habil para concluir a transacao if($transacao->data_expira <= date("Y-m-d H:i:s")." 000000"){ echo "Ainda é permitido pagar"; } else { echo "Esta cobrança não pode s...
asked by 04.10.2017 / 19:11
1
answer

Error: "Call to undefined function mysqli_init"

I'm doing a test with the codeigniter framework 3.1.5 and trying to connect to the database it has the following error: Fatal error: Call to undefined function mysqli_init () The complete error description: Fatal error: Call to undef...
asked by 14.08.2017 / 13:06
1
answer

Mask for digital ticket line field

Would anyone know if there are any masks for the ticket line? I have a screen where a client's ticket listing is displayed, and I also display the entire line with no points or separations, since this record comes from a webservice. And in th...
asked by 04.10.2017 / 17:16
1
answer

SQL query problem in laravel

I'm not really understanding these queries in laravel php. I did a search of cities states where when searching the state lists the corresponding city, but it does not find the id of the table if the relationships were done correctly. Municip...
asked by 04.10.2017 / 18:49
1
answer

Format date in PHP English and Spanish?

I have this code PHP to format the dates coming from a SQL : setlocale(LC_ALL, 'pt_BR', 'pt_BR.utf-8', 'pt_BR.utf-8', 'portuguese'); date_default_timezone_set('America/Sao_Paulo'); I also need to do English and Spanish , how...
asked by 25.07.2017 / 22:06
1
answer

How to call a linux executable program in php code?

I have a question, I have a web application in PHP from which I will receive a txt file. I need to call a program in linux that will execute this txt file and, I would like to know, how would I call a linux program in PHP code by sending the txt...
asked by 25.07.2017 / 23:17
2
answers

Insert multiple with PDO php and MySql

My situation, A POST form with a text input and two input radios. Inputs are named respectively nome[0] and tipo[0] . When someone adds more fields to the form, I put .attr to get nome[1] and tipo[1]...
asked by 29.01.2018 / 02:27
1
answer

SELECT ... WHERE LIKE name bind_param

I have the following code: <?php $link = new mysqli("localhost", "root", "minhasenha", "meu_db"); $produto = $_GET['q']; $produto = '%'.$produto.'%'; $busca_produtos = $link->prepare("SELECT id, nome_com from clientes where nome_com...
asked by 01.08.2017 / 20:45
1
answer

how to make a pop up that opens in the same window

I would like to know how to make a pop up that opens in the same window after the user clicks a button on the page. The content of the pop up would be on a separate page.     
asked by 02.02.2018 / 22:52
1
answer

Object-Oriented Programming Simple Doubt with Implements

I'm using a php library. It has a class with a method that takes as parameter exactly this text that I will write: TextElementInterface $pText = null . In the definition of TextElementInterface it is an interface. How do I pas...
asked by 18.10.2017 / 15:15