Questions tagged as 'php'

2
answers

What is the name of the = operator in PHP used in arrays?

In PHP, when we are going to declare a array directly, we have the => operator. I know that in PHP we have -> , which is object separator , but I needed to give the name to => and could not explain. Wha...
asked by 28.07.2015 / 17:26
4
answers

Select mysql accent showing question mark " " [duplicate]

Today I migrated my site to the hostgator and this problem happened, the accents are all with some characters The files are all with correct accent in the database My collation in the database is like: utf8_general_ci I'm using meta...
asked by 26.04.2014 / 00:23
2
answers

get original HTML entities with javascript

I need all the original HTML entities of a paragraph, especially the accents, the methods I know recover only some entities, as in the example below where ">" is correctly coded but "ç" is not. It is important that the code can differentia...
asked by 20.08.2015 / 21:46
4
answers

Sending mail via PHPmailer to Gmail [closed]

I can not send an email to my Gmail account via PHP. I had a previous project where I tried to use phpmailer and I can not get it working properly (2 months trying). I have now finished a site and just need to put it up, and phpmailer...
asked by 29.09.2015 / 17:50
2
answers

What do I save in a login session?

I am developing a login system in PHP and MySQL for an administration panel, and I have seen many "secure" login systems where they store the user login or password in the session, when they are not both or until all the user logged in data....
asked by 02.11.2014 / 13:32
4
answers

How to prevent direct access to my PHP code?

I have a PHP application and I do not want the user to type in the address bar the name of a specific file, for example { example.com/enviar.php }, all my files are called by index.php, how could I avoid direct access to all of them except the i...
asked by 19.11.2015 / 00:53
2
answers

PDO Drivers for SQL Server

I'm trying to run a PHP application (version 5.5.8) with the connection to the SQL Server database with PDO, but it returns the following error:    could not find driver I have tried to enable features in php.ini but to no avail! Remem...
asked by 23.01.2015 / 18:15
2
answers

How to detect Ajax Request? [duplicate]

Is there any way in PHP to detect if the request is Ajax?     
asked by 22.05.2014 / 15:52
2
answers

How can I get the results of the lotteries?

I looked for lottery APIs to get the results of the contests, unfortunately I could not find any. The answer from @fpg1503 can only read the result of the current game, I wonder if it is possible to get the results of the previous game...
asked by 20.01.2015 / 16:02
3
answers

What is the difference between 'yield' and 'return' in PHP?

I've been trying to get that doubt out, but to no avail. At first glance they looked like similar commands or they would be the same thing. After seeing some explanations, I was a bit confused and did not take my doubts. If they are not the s...
asked by 13.01.2016 / 16:31