Questions tagged as 'php'

3
answers

Function to duplicate maturities in n parcels?

I am having problems creating a function to duplicate the maturities, my scenario is as follows, I want to pass to the function 3 variants, being theTotal value, QtyParcels and firstVerification and if there is more than one parcel an array is c...
asked by 09.01.2017 / 17:10
4
answers

Search between dates

I need to search my MySQL for some registered employees. I have the dt_nation field and I need, for example, to look for employees who are between 20 and 30 years old, how can I do that? With this code snippet I get the dates, but unfortunate...
asked by 21.05.2014 / 19:49
2
answers

Block PHP page to only show data if it is an AJAX request [duplicate]

I have a .php file that loads and displays all news from my database, I use this file to load the news dynamically with AJAX. So far so good, the user can usually go to the index.html page and see the news that has been uploaded...
asked by 22.08.2014 / 20:47
2
answers

Insert data into the database using mysqli

How do I insert this data into the database using mysqli : print $data->access_token."<br />"; print $data->username."<br />"; print $data->full_name."<br />"; print $data->id."<br />"; ... $conexao...
asked by 05.05.2014 / 08:23
2
answers

How to organize by proximity using PHP?

I have some locations registered in the database and each of them has the longitude and latitude. When the user enters the site, I ask him to report his geolocation. I'm using the library PHPGeo to compute the distance between each, but how ca...
asked by 28.05.2014 / 17:39
1
answer

What is the hash generation algorithm that Laravel uses?

By default Laravel already comes with a pre-ready authentication system, however, someone would know to tell me what the default algorithm this framework uses for hash and what version thereof?     
asked by 01.03.2017 / 14:04
3
answers

Store in the database or in sessions

When doing a search, I found that some colleagues store the cart products in sessions like this: $_SESSION[cesta][$indice][produto] In particular, I usually store client products in a database table and after a certain open period (I have a...
asked by 14.03.2017 / 22:27
2
answers

Is it wrong to have a class with methods only?

Is it wrong to have a class with methods only? Or would it be better to use namespaces to save functions?     
asked by 05.05.2018 / 00:36
2
answers

Correct way to perform a dynamic UPDATE with PHP in MySQL

What is the right way to do% dynamic%? The big problem is to be dynamic, if I pass only the first parameter and others do not change. What is the best way to leave this update only with the parameter I am changing without the need to pass...
asked by 09.10.2014 / 00:32
2
answers

Is it possible to run a JavaScript function through PHP?

I want to run a function of JavaScript without "submitting" it, that is when the screen is accessed the php will call the function JavaScript and run what it has in it and then continue the normal code. It's possible? Note:...
asked by 13.10.2014 / 15:24