Questions tagged as 'php'

2
answers

Choosing the method for hashing in PHP

My question began when I decided to re-examine the method I was using to obtain the user's password and store it in the database. After reading this , this and this question here on the net, plus many others on other networks, such as this...
asked by 08.08.2016 / 19:40
2
answers

Can I use empty and isset in a variable?

Here's an example: if(isset($_POST['nome']) && !empty($_POST['nome'])) { session_start(); $_SESSION['nome'] = $_POST['nome']; } View demonstração If I can not use this, what would be recommended? I'm trying to ta...
asked by 18.05.2015 / 22:51
3
answers

How to convert a MySQL connection to MySQL? [duplicate]

I decided to listen to some users to make the conversion but I need your help because I have done a lot of research and nothing works. The first file is: <?php include_once("/pasta/connectserver.php"); $table = "rjpsync_tag, rjpsync_i...
asked by 17.09.2014 / 13:47
3
answers

Sort a multidimensional array with numeric values

Let's suppose the following situation in which I have array composed of several array with numerical values: $array = array( array(22, 25, 28), array(22), array(22, 23) ) I would like to leave this array ord...
asked by 31.01.2014 / 17:05
4
answers

Get TAG value from external HTML link

I need to get the value (or values, if I have more than one) of TAG <link> of an HTML from another site. Attempt: $url = 'http://localhost/teste/'; $content = trim(file_get_contents($url)); preg_match("/<link(.*?)>/i",$co...
asked by 11.02.2014 / 20:28
2
answers

Grouping and adding array with PHP

I need to know how to group and add array , but I'm not sure how to do it. $array = array("vermelho", "vermelho", "vermelho", "verde", "azul", "azul"); I wanted a return like this 3 1 2 That is, it will group and add up the amoun...
asked by 08.01.2014 / 00:06
5
answers

Restriction of words in comments

I'm doing a gallery of images that in this gallery will have comments, the comments are already being sent to the DB and returning the way I wanted. But I need to make a filter for the comments, if they have any bad words the comment does not ri...
asked by 05.11.2015 / 12:41
1
answer

Enable .htaccess on ubuntu

I'm using the ubuntu system on my PC and my apache does not seem to recognize htaccess, none since I created a .htaccess for my project only it does not interpret what's in the content. The content is as follows: .htaccess RewriteEngine O...
asked by 24.08.2014 / 01:57
4
answers

Use of & along with Operators and Functions in PHP

What is the meaning of using & with operators and functions in PHP since I checked in some libraries Example and functions this use (I am aware of the use next to variables has relation to the passing of pointers) $browser...
asked by 19.02.2015 / 12:57
3
answers

How to make a multilingual website?

I have a site made in PHP, now it has come to me that it is obligatory to make the site multilingual. I need to translate titles, menus and error messages. Texts added a posteriori by the user do not need to be translated. I have seen several...
asked by 18.06.2014 / 16:57