Questions tagged as 'php'

1
answer

How do I get the Array generated from the print_r () function to send in email?

I'm developing a logging system and need to get the data generated by print_r () , to send in the email in case of an error in the API, this way the developers will be warned, already containing all the data, including the array. Thank you!...
asked by 18.07.2016 / 20:32
3
answers

Select works on localhost but does not work on the server

The select was working normally in wamp, however when uploading the site to the server the information on some pages simply stopped coming. The only part where select is working is the login area of the administrative area, I ha...
asked by 02.10.2015 / 19:22
2
answers

Using $ time = date ("d / m / Y H: i: s", time () - 86400); to delete past schedules

I am using this code to exclude schedules with dates and times already passed in relation to the current time. <?php while($res = mysql_fetch_array($select_agenda)){ $id = $res['id']; $nome = $res['nome']; $tel = $res['tel']; $cel = $res['...
asked by 02.10.2015 / 20:31
2
answers

create_function can be a risk to my code?

PHP from version 5.3 has implemented the feature called funções anônimas or Closure . Its use goes like this: $sort = function ($a, $b) { return $a - $b; }; $array = [1, 3, 2]; usort($array, $sort); However, when it c...
asked by 19.11.2015 / 16:41
1
answer

Angled Factory to enter data into the bank

How do I create a function, in factory, to enter data in the database? I have this: .factory('pegaContas', ['$http', function($http) { var _getContasEntrada = function(id_empresa) { return $http.post("php/index.php", id_empresa);...
asked by 21.11.2015 / 15:09
1
answer

Redirect a domain to subfolder without changing the URL, but not allowing otherwise?

I have the following problem, I have an application with the following structure: app - Folder to store project files as controllers and models. public_html - Stores public documents on the web, such as index, uploads, css. routes.p...
asked by 22.11.2015 / 02:32
1
answer

How to put the current date and time in a datetime field? [closed]

I have a date field in a table that is of type datetime and I want to put the current date of my server. Ihavetriedeverything,withNOW()intheinsertionSQL,butthenIsawthatitdoesnotwork.IalreadytriedtochangetheDEFAULToffielddatetoCURREN...
asked by 19.01.2016 / 11:01
1
answer

The best way to organize menu and footer in php is with with includes? [closed]

File menu.php : <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="#"><img src="/imagens/logo.png"></a>...
asked by 21.01.2016 / 16:07
2
answers

Get userid by SESSION

I have a question, how do I get the id of the guy who logged in on my system? So that later he can change his data. <?php if (isset ($_POST ["loginUsuario_externo"])){ include_once("../controllers/Usuario_Externo_Controller.php"...
asked by 29.10.2015 / 14:21
1
answer

Is it possible to use IGNORE based on a field other than the PK, is it just a Single Index?

Considering the following modeling: ID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY PONTO INT (10) NOT NULL UNIQUE ENDEREÇO INT (10) NOT NULL (FOREIGN KEY) Where the ID field is an Auto Increment field, the PONTO field is a field...
asked by 04.11.2015 / 21:20