Questions tagged as 'php'

3
answers

How to send a data to javascript from php?

It turns out that I'm trying to pass a value of PHP to Javascript to validate me if there is already a certain amount of data. The PHP script does its job if the data exists returns 1 and if it does not return 0...
asked by 29.12.2017 / 17:20
1
answer

validate user attempts when logging in

I'm trying to validate an entry login to verify a user's attempts to login. If this completes 3 unsuccessful attempts, then the account is deactivated (In my database, in the user table, the user's status changes to inactive) This is my code:...
asked by 26.06.2016 / 18:30
2
answers

Show name of relationship Laravel 5.1

How can I show the name of the client with whom it is related? Migration projects Schema::create('projects', function (Blueprint $table) { $table->increments('id'); $table->string('nombre', 60); $...
asked by 01.05.2016 / 05:41
2
answers

Argument 1 passed to Illuminate \ Auth \ EloquentUserProvider :: validateCredentials () LARAVEL 5.2

A few days with this error and I do not know what is due, I was trying to make a login, with the make: auth of Laravel, the connection to the database is good, the fields exist and the routes work correctly , but when authenticating, this error...
asked by 26.04.2016 / 12:04
2
answers

php and query query

I have a form with which according to the data that you get, you get information from a database. My problem is that if I do not enter any data (I do not put min1) I get all the information, when I should leave a message with "the table is empty...
asked by 23.12.2018 / 12:24
1
answer

Timestampdiff does not work in Clause Where

I'm doing a query to the database and I want to show me only the records in which the difference between the query time (NOW()) and the time of the datetime variable is less than 60 minutes ... (which shows everything that is more than on...
asked by 24.02.2017 / 03:46
4
answers

Take variable from an array in PHP with CodeIngiter

Hi, I have the following in CodeIgniter: MODEL: public function GetHoraPaciente($rut_paciente,$estado){ // muestra todoas las horas pedidas del paciente $this->db->where("rut_paciente",$rut_paciente); $this->db->where("...
asked by 02.03.2017 / 22:00
3
answers

pass variables from php to javascript

Hi, I would like some help with this question. I have this php code but I would like to pass it to javascript only possible $referr = $_SERVER['HTTP_REFERER']; $keyface = 'facebook'; $desdefacebook = strpos($referr, $keyface); if ($d...
asked by 02.03.2017 / 21:40
2
answers

How to subtract first value with last value in array [PHP]

I'm starting with PHP and I have to do this exercise: As a data I can not use php functions The exercise consists of entering a number through a form, this number indicates the length of the array and filling the array with random numbers. On...
asked by 25.11.2018 / 19:02
1
answer

Error counting the same day

I have a system that calculates the number of days but the problem is that the client wants that the current day I also add them. Example: if I choose today 12-13-2018 at 12-15-2018, it results in 2 days and I have to count 3 days. script.js...
asked by 13.12.2018 / 20:55