Questions tagged as 'php'

1
answer

PHP environment variable of xampp is not added to the path

I am installing Xampp using the windows command console in an unattended manner. When the installation completes, xampp is installed well except that the environment variable PHP is not added to PATH in the system variables. I'm using win...
asked by 06.10.2018 / 16:36
1
answer

doubt when passing a preg_match parameter

I have a doubt I want to pass a parameter within the rule eg the value that is entered is 1500-2000 and I want it to only validate the numerical value with the hyphen in between. I still need something to detect the script. CODE: if(preg_ma...
asked by 06.10.2018 / 16:53
1
answer

I need to know how to compare two records in php with mysqli

The code is as follows, it is for a university project, I am making a cup model and I am inserting matches and I need to validate that the two selections are from the same group, here the code but does not work <?php require_once 'conexi...
asked by 01.09.2018 / 02:12
2
answers

Find the matches of a string in an Array

I have this code where I define an array and then there is a String, I want to find the matches for each possible value of the array, in this example I would have to return 2 matches in the string $ searchname but the print_r that I do returns a...
asked by 30.08.2018 / 12:47
2
answers

Combine If in PHP with Time

I am modifying a reservation system and I want it not to be reserved for more than 24 or 48 hours in advance. Currently when it is Monday, with the following code I can make reservations for the whole week: Resuelto Right now the only thing...
asked by 02.09.2018 / 01:51
2
answers

SQL statement to locate if a date is between 2 others

I want to be able to find all the records with value 1 in attendance that are between 2 dates for a user: SELECT * FROM asistencia WHERE id='124' AND asistencia = '1' AND fecha BETWEEN '2018-07-30' AND '2018-08-12' And as an additional fi...
asked by 15.08.2018 / 14:41
2
answers

Protect my code in php, laravel, javascript and css

Some time ago I asked this question: How to give an understandable format or ID to a css and / or js file? , now what I'm looking for is the reverse process of that. that is: having a certain code: $("#btn_load").click(function(e){...
asked by 16.08.2018 / 14:38
2
answers

Sending variables by ajax I receive an empty object

I am trying to send a variable that I get from an input to my controller in the following way $(document).ready(function() { $(".autocomplete").on('blur',function(){ var occ = $("#oculto_id").val(); $.ajax({ url...
asked by 03.08.2018 / 18:09
1
answer

Datatable JSON Invalid JSON response

Why this error is due    DataTables warning: table id = Table_Tools - Invalid JSON   response For more information about this error, please see    link I enclose a photo with the answer on my network My code // Call the dataTa...
asked by 01.08.2018 / 21:52
1
answer

How to filter explicit images when the user uploads their profile picture in php?

Well here with another doubt. We know that any person, out of simple curiosity or annoyance, when uploading their profile picture on a web page, could happen to upload images to the server with explicit content. This is where I wonder how...
asked by 03.08.2018 / 00:23