Questions tagged as 'php'

1
answer

How to validate the IP of an Emails list to know if they are real or false and if they can receive message?

I know there are services that do this, but I would like to know how they do this type of test, to find out if the email is actually valid, not only through a PHP filter, for example: function validEmail($email) { if (filter_var($email, FIL...
asked by 19.04.2016 / 15:49
2
answers

How to dribble the table tags that are inside the foreach in PHP and HTML

I need to set up a table of days and events. When one of the days of the event is the same as the table day, it has to appear on the screen in the correct place. I am already able to compare and show, however, because the table is all disassembl...
asked by 09.11.2014 / 20:51
2
answers

PHP's imagecopyresampled () function hacking in the wrong place

I have already inverted the parameters several times to check if I was passing them wrong, but I did not succeed. What is happening is that the crop is carried out in a different location than specified. I'm using jQuery and the jCrop plugin to...
asked by 18.11.2014 / 00:18
3
answers

Solution to select with many options

What is the best solution to make <select> leave this selected result in a <select> with many options? I use IF in this situation with few options, but it is not feasible for a very large ... Following sample code...
asked by 26.08.2014 / 18:11
1
answer

Stock Control

I'm developing a shopping cart ... I arrived in a party that ended up going wrong ... following the cart consists of additional product revenue and removal of ingredients tabela produtos id nome id_lanche preço 1 X-egg...
asked by 25.09.2014 / 10:02
2
answers

Group items by one field in different arrays

$resultado = $modelSga->getConsultaSga($ano, $mes, $unidade); foreach ($resultado as $res) { $idServico = $res->id_serv; $servico = array(); if($idS...
asked by 31.10.2014 / 16:18
2
answers

Why has the "salt" option of password_hash been discontinued in PHP 7?

I'm getting the error while trying the following test: [ "salt" => "um salt grandão de responsa", "cost" => 12, ] password_hash (123456, PASSWORD_DEFAULT, $options); Returning:    Use of the 'salt' option to password_hash is dep...
asked by 25.01.2017 / 11:41
2
answers

Is there any alternative to PHP's mysql_connect command?

It was all working fine until apparently the installation of Nginx say that my command mysql_connect had the following problem:    Warning: mysql_connect () [function.mysql-connect]: Headers and client library minor version mismatch. H...
asked by 30.10.2014 / 16:53
1
answer

Delete repeated words from an array and sort it

I have a certain function that returns me array cluttered with multiple cities repeated. This way: <?php function getArrayCities() { return array("são paulo","rio de janeiro","belo horizonte","recife","fortaleza", "porto alegre",...
asked by 09.01.2017 / 22:34
2
answers

nRec empty when receiving return from SEFAZ

Using the NFePHP project API, through the function: $retorno = $nfe->sefazEnviaLote($aXml, $tpAmb, $idLote, $aResposta, $indSinc, $flagZip); I get the array $aResposta . However this array is returning the nRec empty tag....
asked by 12.01.2017 / 15:30