Questions tagged as 'php'

1
answer

Integrate application nodejs to php site on different servers?

How can I integrate a chat application hosted in Heroku to my PHP project on another server? The application is simple and does not use bank, the idea would be that in PHP when doing login automatically in Heroku the user enters the chat...
asked by 09.09.2014 / 08:34
2
answers

Paging blog, limiting posts

I have a blog embedded in the site and I want to limit the number of posts per page, but the problem you are giving me is that it does not limit my posts. Code ///Ler posts do blog da página atual $result = mysql_query("$busca LIMIT $inicio...
asked by 16.09.2014 / 12:28
1
answer

Login with permission levels [duplicate]

I have a login system that, in case the user is an administrator, will be redirected to one page and if it is common, for another. This column ativo is what defines whether a user is admin (1) or not (0). identifiant | senha |...
asked by 25.09.2017 / 14:59
1
answer

Validate data with PDO

I'm migrating my php code in which I was using sql query for PDO, but I'm finding it difficult to validate data with this. NOTE: I already have a functional file that searches the database, my difficulty is really to compare it with POST and...
asked by 20.09.2017 / 17:03
1
answer

PDO suppresses columns with equal names

I noticed that using PDO to execute the query below, the results are conflicting with PhpMyadmin and Console do Mysql : SELECT a.*, n.* FROM arquivo AS a INNER JOIN numeracao AS n ON (a.id_numeracao =...
asked by 08.03.2014 / 06:02
1
answer

Check registrations between today and 10 days in the future to send by email

I'm using PHPMailer to send an email with data when it's 10 days to complete. When I send the email, all records are appearing when the idea is to appear the registrations between today and 10 days in the future. Inquiry $sql = " SELECT t...
asked by 03.03.2014 / 12:17
2
answers

PHP Database error

I uploaded my site (using filezilla) using php / mysql. In localhost it works perfectly but not on external server. The following error appears:    SQLSTATE [HY000] [1045] Access denied for user 'root' @ 'localhost <?php try { $pdo...
asked by 07.03.2014 / 18:29
1
answer

PHP You doubt how to optimize the Session

Today I use the following code to start a Session in PHP //verificação se o id de sessão ja existe, se não existir, cria if (!session_id()){ // iniciando a sessão session_start(); // buffer para evitar o erro ao acionar o headloca...
asked by 22.08.2017 / 01:56
1
answer

Show child results in parent array in Codeigniter

Good afternoon, I'm starting on Codeigniter and would like some help. I have a Soccer Times table. Each team has its players that are in another table of my bank. I get the values of these two separate tables, but I would like to create on...
asked by 15.08.2017 / 15:45
1
answer

Is it correct to use PHP code in the view layer along with HTML?

I'm starting now in the area and I have a college job to do and it's necessary to use the MVC standard, I've even separated things well, but I came across the following code in a file from my view layer >, the filename is novoAtendimento.php...
asked by 20.08.2017 / 20:14