Questions tagged as 'php'

1
answer

Browse JSON in JavaScript

The following scenario is presented to me, I have in my HTML a <textarea> in which the user will enter a query, as if it were the command line, example, I can enter:    SELECT * FROM users;       SELECT * FROM countries;...
asked by 22.09.2017 / 05:31
2
answers

Save the contents of an array in a .txt using PHP foreach

I'm looking for how to save the contents of an array in .txt: <?php $resul = array('hermaniribeiro', 'Ebtsama', 'BrittoOFC', 'CheesterG', 'dsolutec', 'ExpoGanSon', 'dsolutec', 'ExpoGanSon', 'dsolutec', 'BelforFx', 'kunakrec', 'YouTub...
asked by 30.09.2017 / 04:20
1
answer

PDO fetch array

I would like to know if there is any way to rename the keys of an associative array that is given by PDOStatement :: fetch. The sentence that I prepare and execute in SQL does not come to the case in itself (although if they require it, I can ad...
asked by 04.01.2018 / 21:30
2
answers

Error inserting data with PDO and POO

Greetings community. I am developing an application using PDO, I am starting and I have had a problem when inserting records in the database. Next I put the functions that I am using and the error that is giving me. First my controller receiv...
asked by 31.12.2017 / 02:03
1
answer

Using $ this when not in object context - PHP

I have explored several similar questions before sending this post, so I am sure of what I am doing. I am creating a web application written in PHP, where I have some classes that I usually call, such as using Url::exists($alias) . W...
asked by 04.08.2017 / 02:43
1
answer

why PHP Script does not run, but if it runs "phpinfo ();"?

I am working with a LAMP architecture, with apache2 server, php7.0 and MYSql, in ubuntu 16.04, and managed to configure the route for my development, in this case, that goes from /var/www/ to /var/www/html/midesarrollo , to prove it...
asked by 06.04.2018 / 02:34
1
answer

Can I use several requests in a laravel 5.3 mutators?

I try to save two input in database and I was thinking about doing it with mutators, the fact is that if I modify a field I only manage that value because the $ value that I receive is the one that sends the request, but I need to use something...
asked by 06.04.2018 / 16:29
2
answers

Mysqli_fetch_row error

I am learning PHP and I have been stuck here, the error is as follows:    Warning: mysqli_fetch_row () expects parameter 1 to be mysqli_result, boolean given in C: \ xampp \ htdocs \ intranet \ scripts \ functions.php on line 29 And here...
asked by 02.07.2017 / 20:31
1
answer

Problem with current time in PHP and MySQL

Since I have several date columns in the table and I can not use more than one column CURRENT_TIMESTAMP , through a function that I created I get the current date. The function is as follows: function dame_fecha_actual() { $hoy = get...
asked by 06.07.2017 / 05:40
1
answer

Messages with php and ajax

At the moment of wanting to do a fetch_array send me this error and I can not solve it    Fatal error: Call to undefined method PDOStatement :: fetch_array () my code so far is the following <?php $query = "SELECT * FRO...
asked by 27.06.2017 / 01:13