Questions tagged as 'php'

3
answers

How to connect to the database with postgresql using php?

$dbservername = "localhost"; $dbusername = "postgres"; $dbname = "asistencia"; $dbpassword = "123456"; $puerto = "5432"; $con=pg_connect("host=localhost, dbname=asistencia, user=postgres, $dbname, $dbpassword"); I have previously connected...
asked by 27.07.2018 / 16:08
4
answers

PHP: -IF- Ask if the field has letters

Good morning everyone! I came across something that is making me renege and I still can not find the solution: My code enters a field which if it has LETTERS I cancel it. That is: $valor= "1A8CF4D2414E000094136...
asked by 04.10.2017 / 21:28
2
answers

SQL statement to find a last record per customer by date

I am trying to create a statement that returns a field from a date, but under a certain condition. First of all I have a table with several fields, among which I am interested in the following image: What I need is for you to return...
asked by 05.03.2018 / 15:55
6
answers

Date format change to record and retrieve from MySQL

In a web application under jQuery , I'm using datepicker of jQuery UI . At datepicker I apply a regional setting so that the date is delivered in dd/mm/yyyy format. The user selects a date in the datepic...
asked by 18.11.2016 / 16:47
3
answers

How can I know how many times a data is repeated in an sql query?

Good afternoon I want to know how to get the number of times that a type of data is repeated and take it to a table with php at the moment I have the following code but I do not know how to extract the number of times that a data is repeated in...
asked by 23.09.2016 / 22:35
1
answer

I can not access POST within my class in PHP

I have an HTML form with method="POST" and a submit button. Within my file 'purchases.controller.php', if I do a var_dump ($ _ POST), you can see all my POST variables belonging to the inputs of the form correctly. Now, I have another file ca...
asked by 14.12.2018 / 01:55
1
answer

The mysterious message "example"

You see, I want to send someone a message in Laravel. I have this function: // Enviamos a un usuario inactivo un mensaje de activación. public function mensajeActivar(User $usuario){ Mail::to($usuario->email)->send(new Mensajeria($us...
asked by 06.12.2018 / 17:28
3
answers

Using strpos in a variable with PHP

The following example tells me if the text of the variable $ phrase contains a S as a letter. $frase="respuesta en ingles"; $posicion_coincidencia = strpos($frase, s); if ($posicion_coincidencia === false) { echo "La $frase"; } else { ech...
asked by 11.12.2018 / 22:18
2
answers

Get array values within another PHP array

I have two arrays which contain the same number of values each. One contains the id of materia and the other calificaciones . I need to access the qualifications to later enter them into a database. The problem is that I c...
asked by 11.05.2016 / 18:45
1
answer

Share div content on Facebook

I would like to share the content of a div in Facebook, the div is within a cycle for of PHP, therefore various information is loaded in a table. What I would like to know is how to share the content of each of the div...
asked by 12.02.2016 / 21:29