Questions tagged as 'php'

1
answer

How to calculate between two dates?

I have to do an exercise to calculate how much has happened since January 1 to the date entered. They force me to use switch case and I can not use the function mktime() , and I do not finish working the code that subtracts the dates. The...
asked by 25.10.2016 / 00:43
4
answers

PHP does not show me the errors in form

Good morning, I am creating a form in HTML and PHP, and when sending it I want you to show me an error message if any of the fields does not meet the requirement. My problem is that it only stays in the first field name if I give Send if fill no...
asked by 20.10.2016 / 18:35
1
answer

How to show all data consulted?

I am implementing a system of friendship requests in PHP and MySql. And of course it works for me, but it only shows me only one result, which should show all the results I find. For example, Juan has received 3 requests. There is a text sayi...
asked by 11.10.2016 / 02:50
1
answer

Class error, query php, can not be converted to whole

Hi, I'm doing a page through php but I have a problem when I want to count the number of records and I can not use it to get the number of pages. Php code: <?php require_once 'database.php'; $database_connection = database_connect(); $t...
asked by 13.09.2016 / 22:43
1
answer

PHP PDO Rollback does not work

Hi, I am trying to execute a PDO Rollback in a function where I involve several tables and there are several insert and updates. I am working with MVC and POO. Maybe I have something wrong with my structure, if so, could you tell me where...
asked by 31.08.2016 / 23:24
1
answer

How to make a select with mysql and php from a modal?

I have a modal that opens from a button which comes with the id of the post. This id stores it in an input type "hidden", in the modal. My problem is having this field already loaded with the selected post id How can I filter data from a data...
asked by 20.11.2016 / 17:01
2
answers

Ajax - PHP - Error status change button

I have a table where I show users with a column / id of "state". Where you will have two values: color green (activo, estado=1) or color red (inactivo, estado=0) . I have the following code to change the state but it shows me the in...
asked by 14.11.2016 / 11:44
1
answer

How to pass parameters from a href to a get route in laravel 4.2?

Greetings community I'm working with this route in laravel Route::get('/{tienda}/{ruta}', array('before' => 'validar_tienda', function($tienda, $ruta) {...} to invoke it from the browser bar I have no major problem with the dynamic pa...
asked by 09.11.2016 / 21:44
2
answers

Problems encountered in YII2

First of all, I talk about my stage. I am using the SAP RFC library in YII2 where I am importing an SAP ERP table into my PHP program. The problem is that when printing a variable that contains accents is not printing them correctly, it puts s...
asked by 07.04.2016 / 16:33
1
answer

Hide URL data

Hello colleagues, I need to be able to hide the information you sent by URL. I have looked for codes that help me do it but I have not had good results. The Code is: <?php include("obtenerdatos.php"); $user=$_POST['usuario']; $pass=$_POST[...
asked by 17.08.2016 / 06:51