Questions tagged as 'php'

2
answers

Which tool to use for sending SMS in laravel [closed]

    
asked by 22.01.2018 / 14:01
2
answers

How to suppress warning of a particular line of code?

How to properly suppress warnings generated by PHP in a particular line of code? I tried using the "@", but the warning is still generated in the log. Excerpt of the code that is generating the Warning: ... while ($SrcPos <= strlen...
asked by 03.11.2017 / 20:10
1
answer

What is the safest way to display ID (DB primary key) in web pages?

I'm developing a web application, which in some cases would need to be available in the HTML (so JS can interact) user publications ID, comments ID and others ... Example: <div id="cmt_IDDOCOMENTARIO" class="comment-text"> Comentár...
asked by 07.03.2018 / 15:40
2
answers

Serious error in PHP language [duplicate]

I discovered a BUG in the php language and I'm looking for a logical explanation for this, I have the following code: <?php echo (int) ((0.1 + 0.7) * 10); ?> And the result shown is: 7. Why this? would it be a php bug? Take t...
asked by 25.10.2017 / 14:02
4
answers

Update the data in the bank without changing the others that already exist - PDO

Hi, I am trying to create a page to change the cadastral data with mysql database, but it should only update the data that is filled and do not change the other data if they already exist in the database. I've tried a thousand ways and I can...
asked by 25.10.2017 / 15:08
2
answers

Organization of PHP code

I'm working on a PHP project where multiple tables relate to multiple tables, so how should I organize controllers and DAOs, split files per table - employees, sales, customers, ... or group by actions - employees + sales (employee...
asked by 14.03.2018 / 20:47
2
answers

Insert string with strtoupper

Good morning! I am using a code in WP to display musical notes. It basically takes text from a shortcode "chord" and displays it in the line above. It also converts the b (lowercase) to ♭. Example: The problem is that it converts everyt...
asked by 18.09.2017 / 14:55
2
answers

How do I start jquery results in a div?

My js code is working fine but I wanted it to print the result inside a div in the index.html itself under my textarea and without redirecting to another page, since it is redirecting to the ip.php page and showing the results there. <h...
asked by 07.07.2017 / 18:43
1
answer

Redirect page after sending the file to download

I have a page that when uploaded sends a pdf file for download. How do I after the file is sent to the browser, redirect the page? I am sending the file like this: // Dados do arquivo $file = "Arquivos/documento.pdf"; // Configuramos os he...
asked by 14.07.2017 / 19:19
1
answer

Function to check if all elements of an array of variables are null

Suppose I have an array where each element of this array is a variable that stores a string inside it. Example: error{ [nome] : null; [sobrenome] : "sobrenome inválido"; [estado] : null; } I would like the program to ident...
asked by 28.09.2018 / 15:52