Questions tagged as 'php'

1
answer

Php with MVC does not work in Ubuntu, how to make it work?

I did a project in php with MVC, in Windows everything runs normal; I installed ubuntu with all the tools, php, Apache 2, Mysql and it works normal with a php file that is in a single page, connects me with the database, but the project made wit...
asked by 23.06.2017 / 21:04
1
answer

Create a json object for data table

I am currently working on a project where the datatable library is used, the query is done using PDO where I already bring the arrangement with the records of the query. So I bring the records of the consultation with PDO: $prep = $this-&...
asked by 28.06.2017 / 21:16
1
answer

Event KeyCode Jquery does not work

Good day, I have a problem when trying to program the KeyCode event. I'm sure it has nothing to do with the JQuery library because I already tested an alert, which tells me it's working fine. I hope you can help me, I have reviewed the code s...
asked by 18.06.2017 / 21:30
2
answers

Problems with the UTF-8 encoding in mysql

I have problems with the character encoding with the ñ and tildes, the page is in utf-8 and the table and the DB in utf-8_general_ci but it happens as in the following image. Any solution? $ connection = new mysqli ($ host, $ userdb, $...
asked by 17.06.2017 / 19:24
2
answers

How to insert several data at the same time in mysql and php?

I want to insert several values at the same time in a mysq table, I have two INSERT'S but only the first works (formatted), the other is constituted by a for cycle because it is inserted three times but it does not work (orders) this is the code...
asked by 16.06.2017 / 18:48
1
answer

Problem with UPDATE IN mySQL

Something is happening to me that I can not understand. I have a form that has two inputs of the button type, apart from other fields to fill. These two buttons have two different actions, one to show a preview and another to save changes to the...
asked by 18.06.2017 / 23:26
2
answers

Problem with ORDER BY: DESC

Good, I have the following problem, that I have a social network where people can post things and send messages, the thing is that by doing select of all publications and show them the order by UNIX_TIMESTAMP (data) DESC does not w...
asked by 14.06.2017 / 13:56
1
answer

Evaluate variable received with request to the server with ajax

Good afternoon, I have the following 3 codes. Using the javascript code with ajax made the request and it is done correctly, this is the login of a user, in case of being correct the data says "Welcome" otherwise "There are no registered user...
asked by 24.06.2017 / 22:59
1
answer

Compare values of two PHP Codeigniter array

I am working with php and codeigniter , and I need to compare two array of type $array1 = ['1','2','3',]. and regardless of the size of both know the values that are not present in both array , for example $arr...
asked by 25.06.2017 / 19:38
3
answers

Access Denied mysql

This error appears: Warning: mysqli_connect () [function.mysqli-connect]: (28000/1045): Access denied for user 'root' @ 'localhost' (using password: YES) This is the code: ?php $server = "localhost"; $user = "root"; $pass = ""; $db =...
asked by 24.06.2017 / 22:09