Questions tagged as 'php'

2
answers

Show all active PHP variables

I need to know if any php function shows me all the variables that are defined on the screen. I'm doing an integration where I depend on other files that I do not have access to and I need to show all the variables I can access Thanks in a...
asked by 22.06.2016 / 09:09
3
answers

Redirect only once

I have an index.html that does an automatic redirection with the window.location function to a different domain. The problem is that if the user gives back to the browser it redirects again, so it is a loop. How can I do that if a user gives...
asked by 18.06.2016 / 00:15
3
answers

I would like to order an array that I create from mysqli_fetch_array

Greetings friends, I would like to know how to order a list that you create from a mysqli_fetch_array . Apart from this code I have a search engine, what I want is that the results of the search appear in a specific row, for example cod...
asked by 23.06.2016 / 00:29
1
answer

Login with password_verify

I applied encryption passwords using password_hash() . When I try to login using password_verify I can not access. I think the problem is in the $row = $query->fetch(PDO::FETCH_ASSOC) part because when I do var_damp(...
asked by 01.06.2017 / 12:17
1
answer

efficiency when displaying data with PHP

As a result of making a web page, a question has arisen. At the moment of showing on screen some type of information by echo with php how would it be better to show this data, in terms of efficiency? Showing everything with a single...
asked by 01.06.2017 / 23:24
3
answers

Get several data in a single mysql query

I have a mysql database of the index of a course (id,tipo,titulo,completado) I keep the different types that make up the index (classes, exercises and exams). I need to know how many exercises, classes and exams the course has to do so: S...
asked by 21.04.2017 / 20:40
2
answers

Login MySQL, PHP and AJAX

I am developing an application with Phonegap . I would like that when I log in, I will check if it exists in the database. In case you have to save the email address ( email ) in localStorage . HTML Code: <div class="login...
asked by 15.05.2017 / 12:23
1
answer

Group by matches in a PHP array

I have a multidimensional array with indexes, in which I keep the data, about a user and their stops, this I show for days. I am interested in the days that have the same stops are grouped. The array I get from two SQL queries in this way:...
asked by 17.05.2017 / 10:29
1
answer

Know if a number n / 4 gives PHP integer

I've done this: $year=2016 if(($year%4)==1){ ... } I would like to know if a number divided by 4, its result is whole, that is to say. 2016/4 = 504, therefore it would enter the if.     
asked by 28.05.2017 / 11:15
1
answer

Create method show () in Laravel

I am working on a library control system, when making an individual view of an element of the database I use the show method of my LibroController in the following way: public function show($id) { $libros = Libro::find($id);...
asked by 04.02.2017 / 00:50