Questions tagged as 'php'

3
answers

How to give a MySQL field line break in an HTML page

I need to save a value with a line break in the table For example, instead of saving: 0 anos, 3 dias Save: 0 Anos 3 Dias I tried the following process: INSERT INTO tabela (tempo) VALUES ('0 Anos\n3 Dias'); He even broke the cod...
asked by 10.04.2015 / 00:18
3
answers

Pass SQL result to JSON

Hello, I want to pass the result from a select to json, but I can not see why I can not see it. So could anyone tell me why this code does not print anything? include_once 'conexao.php'; $query = "SELECT client_id, name, email FROM clie...
asked by 03.11.2016 / 23:57
2
answers

Is working with session safe? [duplicate]

Example, if I create a session session_start(); $_SESSION['nome'] = $nome; #valor pegado anteriormente. Can the end user see and edit the data in it?     
asked by 20.11.2015 / 00:58
3
answers

Incorrect multiplication calculation [duplicate]

For some reason when I make the calculation by multiplying by a floating value, PHP always returns the wrong value. Example: echo ((33 * 0.8) - 26.4); result: 3.5527136788005E-15 But the expected result would be 0 I could no...
asked by 07.03.2017 / 18:44
3
answers

Encryption security in php [duplicate]

I know there are other things that help keep a system secure, but I would like to know specifically about one: information encryption. For example, the password is information that my projects always try to get encrypted in the bank. My que...
asked by 18.11.2015 / 15:01
3
answers

What does the term "routing" mean in the context of MVC architecture?

I'm starting to study this architecture and came across this term: routing . edit Do I need some framework to build on this architecture?     
asked by 17.11.2016 / 19:04
3
answers

Make you refresh the page and then see the message

Hello, How do I send a contact form for example, give a refresh on the page and show the sending message? Code: Javascript: function showAlert(type, message) { if (message !== '') { if (type === '') { typ...
asked by 31.12.2015 / 05:57
3
answers

What is the difference between foreach uses in php?

What is the difference between these two means of using foreach in php? Would one be more special than the other, bringing some advantage for example? Method 1: foreach ($arr as $key => $value) { #do something } Method 2:...
asked by 03.11.2016 / 02:34
3
answers

How to create executable program in PHP?

Is it possible for me to create a program for my company that is executable only with PHP and MySQL? Or I'll need other languages, like C, Java, etc ... In case the program is internal only.     
asked by 21.06.2017 / 22:49
0
answers

Working with two databases in Laravel [closed]

I'm creating an application that needs to connect to 2 different databases. A database I'm creating (MySQL) and a database I got ready that I have permission to query only (SQL Server). The purpose of the application is to query the data of the...
asked by 19.10.2015 / 12:08