Questions tagged as 'php'

2
answers

Receive information from the database and send it to the form field

Good morning. I wanted to know how I can get the information I want to be sent into input (Client Name), because I made the select and the information was not placed in the form field, it was on top. Follow my code below. PHP <body&g...
asked by 07.07.2015 / 14:18
2
answers

ORDER BY WITH GROUP BY to get last row, sql

I am using this SQL code to pick up data, first it groups then it organizes by the birth date of rows . SELECT U.id, U.born_data, U.bold FROM users U GROUP BY U.bold ORDER BY U.born_data DESC In the meantime it does an inversion, it organ...
asked by 01.07.2015 / 16:17
2
answers

Transform into json

I have a string: {name:"Sara", daypart:"day", href:"http://pt.stackoverflow.com/questions/ask", bg:"su", temp:"calor", realfeel:"hot", text:"cloudy"} I'm basically looking for a quick way to turn this into JSON, ie put quotation marks (...
asked by 30.06.2015 / 18:58
2
answers

Problems retrieving object from a json

Well I have a file in php that takes a Json array and retrieves the recipient field. The code is 100% working on my localhost. But when I put it online, it does not work. Follow json: { "data": { "messages": [ { "id": 1,...
asked by 28.10.2016 / 12:30
1
answer

Execute console command and read return in PHP

In linux if I do the command df -h in the terminal it returns me the partitions, size etc ... as I show below: Filesystem Size Used Avail Use% Mounted on /dev/sda3 25G 6.4G 17G 28% / /dev/sda5 70G 2.9G 64G 5...
asked by 28.10.2016 / 12:24
1
answer

Detect if link is current or external domain with PHP

I'm currently using this expression with preg_replace to detect links in content sent via POST : $conteudo = $_POST["conteudo"]; $conteudo = preg_replace('!(\s|^)((https?://|www\.)+[a-z0-9_./?=&-]+)!i', ' <a class="link_ex...
asked by 10.05.2015 / 05:03
1
answer

Routes - CodeIgniter

I wanted to know what this $ means in the definition of the routes, for example: route["(.*)-sid-(:num)-(:num)"] = "services/service/$2/$3"; What does $2 and $3 ?     
asked by 09.04.2015 / 16:41
3
answers

Query data from 1 day to 3 days ago mysql [closed]

I'm trying to show records for the last 3 days, but it should be subtracted two days and only demonstrate the value of a single day before the 2 days, I currently have the following code that is demonstrated the value of the last month subtracti...
asked by 03.04.2015 / 17:39
3
answers

Error Search PHP and MySQL Database

I am making a page that looks for information in tables of a MySQL database, the connection is beautiful, but two errors are appearing:    Warning: mysqli_stmt :: bind_param (): Number of variables does not match number of parameters in prepa...
asked by 29.03.2016 / 17:22
2
answers

Curl, SSL and Security

Hello I have a small question about CURL and SSL. I have seen that it is unsafe to put false in CURLOPT_SSL_VERIFYPEER, as it would cause CURL not to check SSL, allowing data interception. But I did not understand how this could happen....
asked by 01.04.2016 / 21:30