Questions tagged as 'php'

1
answer

Separation of a php string

This is the following I have a variable in php that is the shift that this way (15: 00-16: 00) which represents the hours what I want is to take that variable and insert it into the database separately , that is, get in: $variavel="15:00-16:00...
asked by 31.12.2017 / 17:01
2
answers

How to request day data in SQL with Unix Time Stamp (PHP)

Hi, I'm having one with a question here, I'm creating a code to get how many users logged into my site today, but I saved the last date it logged with Unix Time Stamp. I'm just getting the users who logged in the last 24 hours, but what I wan...
asked by 07.01.2018 / 17:17
3
answers

PHP - Error when I try to login - mysqli_num_rows () expects parameter 1 to be mysqli_result

Good afternoon, I was trying to study a registration system using session in php the part of the registry works normal, the problem is at the time of logging, even with the correct password I get the following 2 errors: Notice: Undefined vari...
asked by 30.12.2017 / 21:47
1
answer

Search interval dates Laravel / Eloquent?

How do I search the date range? I searched and many places indicate how to search for date ranges according to the example below, but with no results. $d1 = data2Mysql($dataI); // format Y-m-d $d2 = data2Mysql($dataF); // format Y-m-d $cur...
asked by 12.01.2018 / 18:50
1
answer

Use str_replace to replace key variable values

Good evening everyone! I'm trying to use the str_replace() method to replace a term within a variable, but it's not working. foreach ($paginas as $pagina => $codigo) { if(!strcasecmp($atual, $pagina)) { str_replace("nav...
asked by 15.01.2018 / 02:02
2
answers

Error parse_str function in php with special character

I'm trying to use the parse_str function of php by stringing a value with the + character, but the result returns me the string without that character, see: p> parse_str("c=item1 + item2"); var_dump($c);     
asked by 22.02.2017 / 17:16
1
answer

HTACCESS - Subdomain

Does anyone know how to configure htaccess? I need it to work with the subdomain, and the main domain does not appear in the address bar when the subdomain is open. Ex how you are now:    [ link My current htaccess is the code below: R...
asked by 15.02.2017 / 12:39
1
answer

Create arrays according to "exploded" strings

I have the following array: Array ( [0] => 1-6 [1] => 1-7 [2] => 2,9 ) I would like to group it according to their initial number. Example result (I'm not sure of this syntax, but just to give the example): Array...
asked by 17.02.2017 / 18:30
1
answer

Insert MySQL data with .txt file

I have the following somewhat simpler file:    new_user.txt JOAO|18|JOAO VITOR BARBOSA|MANDAQUI ROGERIO|38|ROGERIO JOSE DE BARROS|CAPAO REDONDO My table in the database was created as follows:    users create table users ( pri...
asked by 10.02.2017 / 13:18
2
answers

Blaze Laravel (Error when displaying text)

Hello, I'm using the blade to show data, the problem when I use the ucwords and strtolower functions is not displayed. (without the functions of certain, however the text is ugly, or all uppercase, or, small because the clients do not regist...
asked by 08.02.2017 / 15:25