Questions tagged as 'php'

2
answers

User session time

Good community. When the user logs in I add in the database the day and time that this user logged in. The file init.php , which contains the login and which I use on all my pages I put the following code: if(($_SESSION['last_login'])...
asked by 30.01.2016 / 17:47
1
answer

Error doing POST containing "@" or "#" in PHP with cURL

I'm having a problem and I can not fix it, I have a PHP script that submits a form using cURL. Initially I used the format array(key => value) to submit the POST data. However, I had a problem:    When @ is at the beginning of...
asked by 22.01.2016 / 17:20
1
answer

Add date with bank values. CakePHP 3.0

I need to make a calculation that adds an integer to a date. This whole number refers to days. $user = TableRegistry::get('PoliticaSenha'); $query = $user->find()->where(['id' => $usuario['politica_senha_id']])->first(); $dataTro...
asked by 25.01.2016 / 12:41
2
answers

MySQL, help to understand data export

Previously when I exported a database it looked like this: CREATE TABLE 'config' ( 'ID_Config' int(1) NOT NULL AUTO_INCREMENT, 'nome_site' varchar(255) DEFAULT NULL, 'thema' char(50) NOT NULL, PRIMARY KEY ('ID_Config') ) ENGINE=MyISAM...
asked by 05.01.2016 / 18:10
1
answer

Error retrieving json on php side

Well, I am sending a json to php but I can not recover $.ajax({ type: "POST", url: "sys/salvar_servidor", datType: 'json', data: JSON.stringify(dados), success: function( data ){ document.write(data); } }); A...
asked by 29.12.2015 / 12:36
1
answer

Delete expiration date information in Wordpress posts

I'm using the code below to tell how long it takes for a post to expire on my Wordpress website, whose expiration value I set in a Custom Field (expiration). From this code, since I prevent a post from expiring in 4 hours, do not display info...
asked by 12.02.2016 / 18:33
1
answer

How to upload to Silex?

I did some research to learn how to upload files in Silex Framework, but I did not find anything about it. Is there any way to do this through Silex? Or would I have to do with nail only with PHP?     
asked by 17.01.2017 / 15:06
1
answer

Sending Email with PHP

I have a website where the server has just blocked the email sending from another provider, only allowing the email with the domain itself, I made the change from FROM to an email from my domain and it worked, but the received e-mail appears wit...
asked by 18.01.2017 / 13:46
3
answers

How to join two array variables into one in php?

Good afternoon I have the following code <?php include_once("con.php"); $pdo = conectar(); $data = file_get_contents("php://input"); $data = json_decode($data); $idempresa = $data->idempresa; $subcategoria = "Recebimento"; $buscaC...
asked by 18.01.2017 / 20:58
1
answer

Functions that are aliases should they be used or not?

I remember that some time ago, when I was starting programming with PHP, I saw in some tutorials a recommendation, warning that it was to avoid using some functions that are nicknames for others. I do not know if I'm wrong, but in the PHP Man...
asked by 19.01.2017 / 12:49