Questions tagged as 'php'

5
answers

Problem with in_array ()

I have a problem with the in_array function. I made a var_dump() in the array I want to search for: array(2) { ["28c8edde3d61a0411511d3b1866f0636"]=> array(8) { ["id"]=> string(32) "c4ca4238a0b923820dcc509a6f75849...
asked by 11.11.2015 / 10:54
2
answers

INSERT INTO Does not send the data to the database

I have the following code: $con=mysqli_connect("localhost","esferinf_fpessoa","*****","esferinf_factura"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $sql = ($con, "...
asked by 24.03.2014 / 21:50
1
answer

How to reduce the size of a variable passed via POST by compressing it

My application in Android gets the String sends to the arquivo.php that processes the data. I soon saw that I could not pass the code in base64 to arquivo.php . I need some function in java that compre...
asked by 17.06.2015 / 20:34
2
answers

JOIN with two columns in the same table

Good morning. How do I make a JOIN, two column in the same table? In the quote table, you have the column with the ogirem and destination cpf_cnpj. SELECT cotacao.*, clienteOrigem.ID_Cliente as origemIdcliente, clienteO...
asked by 16.06.2015 / 17:23
1
answer

Comparison of PHP schedules

date_default_timezone_set ( "America/Sao_Paulo" ); $dtz = new DateTimeZone('America/Sao_Paulo'); $dt = new DateTime('now', $dtz); $offset = $dtz->getOffset( $dt ) / 3600; $por_do_sol = date_sunset(time(), SUNFUNCS_RET_STRING, -20.7965404, -49....
asked by 23.02.2015 / 21:37
2
answers

limit the for, php

Well, this is the following, I'm generating paging links to get more lightness in my system, the problem is I have many records in the database and this pagination generates many links, thus occupying a very large part of the page, I would like...
asked by 19.12.2014 / 14:38
1
answer

Error $ HTTP_RAW_POST_DATA is deprecated

After upgrading PHP to version 5.6, I started to receive the following message:    Deprecated : Automatically populating $ HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate...
asked by 17.02.2015 / 14:46
1
answer

Saving Colors in the Database

I have a simple form, and a TYPE=color . These colors are passed in hexadecimal, but I can not save them in the database. Because it gives the following error:    Warning: pg_query (): Query failed: ERROR: input syntax is invalid for in...
asked by 18.11.2014 / 23:40
2
answers

How to send checkbox data to a query with mysql?

I do not know how to start this whole process of sending multiple data to a query in the database. I always submit an item for each types but never submitted multiple items of the same type . The image below will best illustrate: Iwouldlikeyo...
asked by 03.09.2014 / 14:54
1
answer

Differences between traits and namespace for loading

Using namespace loads the file when a method is used say , if it does not invoke any of the class the file will not be loaded. use World; class Hello { World::say() } Using trait even without invoking method or property, the f...
asked by 14.09.2014 / 08:02