Questions tagged as 'php'

3
answers

How to get JSON data an external website?

I want to get the value of a JSON that I send from another external web example: I'm sending this from the other website text.php <?php echo json_encode(array("texto"=>"ejemplo")); ?> {"texto":"ejemplo"} And now...
asked by 15.03.2017 / 03:27
2
answers

Get the current time Codeigniter 3x?

I need to get the current time to insert it into the database, I have tried using the CI helper $this->load->helper('date'); now(); I tried this function but it inserts me 00:00:00 Greetings thank you very much     
asked by 20.03.2017 / 06:52
1
answer

If not working correctly - PHP

Why does not the second if work? When doing echo and comment that if the result of it is 1 (in the case where I am) and if it is 1 or 2 should not redirect me but if it does, does anyone see the failure? <?php sessi...
asked by 08.11.2016 / 18:02
2
answers

Fatal error: Call to a member function prepare () on a non-object in

Good morning, when I try to consult a folio on my form I get an error that says:    Fatal error: Call to a member function prepare () on a non-object in Here my code: <?php $serverName = "10.21.22.16"; //serverName\instanceName $conn...
asked by 27.02.2017 / 16:40
2
answers

How to restart sql connections in php

I am programming a system in php that connects to sql , but it has become very frequent that I get this error message:    Warning: mysqli :: mysqli (): (HY000 / 1040): Too many connections in   /home/u442095798/public_html/conexion.php...
asked by 03.12.2016 / 15:56
2
answers

How to go through this array

I have this array, in this way let's say putting the offset which is the 0 . Manually works what I want is that you return all the values of that array without me putting the offset $data_array[$section_key][$sect...
asked by 23.11.2016 / 18:52
2
answers

Load view in a modal with Ajax

Hello! You see ... I have a dilemma with the load of a file (view) that I need will be in the body of a modal , since, this will be the beginning to be able to show information later. As such, I have the following. In my view Li...
asked by 22.12.2017 / 20:29
2
answers

Doubt with page calculation in php pager

I have made a pager by hand to filter the amount of results of a query to mysql that when it had many records took too much time. this is the code that I used: function Paginador($Que,$Pagina,$Cuantos,$Maxpagina,$IdOrden) { $PagMax = ro...
asked by 15.12.2017 / 12:59
4
answers

How to make a personalized error message?

I want to make a custom error message, but not using the alert of Javascript , but the API of form validation. Hoping that when the person does not fill input a cloud comes out asking to fill the element in question...
asked by 22.12.2017 / 14:33
2
answers

Ajax does not run correctly

The structure of my project is as follows: and I have the following code: Login_inicio.html <!DOCTYPE html> <html lang=""> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" conten...
asked by 21.12.2017 / 05:13