Questions tagged as 'php'

2
answers

background-color random in the div without repeating the same color twice consecutively

I want to create a sequence of DIV , but I want every DIV to have in its background-color a random color previously known as black, yellow and green, but I do not want these colors to repeat one after another. Type: yellow...
asked by 25.09.2014 / 19:58
2
answers

Problems with session_start () in the Safari browser

I'm using the Safari browser, and I'm programming in PHP 5.5. inexplicably the safari does not secure session ... in fact neither creates! In other browsers my system works correctly, only in Safari has this problem ... I would like to know i...
asked by 19.08.2014 / 18:20
3
answers

submit button turn a normal link

I need a button with its same values to be "converted" to a normal Link. <input type="submit" name="idPessoa" id="idPessoa" class="text-success" value="<?php echo $this->idPessoa = $lotacao[$i][3];?>"> Is there any ef...
asked by 18.09.2014 / 19:11
3
answers

Convert String to date and remove 1 day from this String

I have this string: $data_final = "26/11/2017"; And I need this variable to be 25/11/2017 . That is, I need to convert string to date and remove 1 day from that date.     
asked by 21.11.2017 / 11:47
2
answers

How to check if a file was selected in the input field?

I do a form validation to ensure that the file a user uploaded is the right type. But the upload is optional, so I want to ignore the validation if it did not upload anything and sent the rest of the form. How can I check if it has loaded someth...
asked by 20.11.2017 / 17:59
1
answer

Send email to client to check whether or not [duplicate]

I made a registration to be inserted the cpf and email, the cpf I could validate right, to see if it works or not. But when it comes to the part of knowing if the email exists ... I researched a lot and saw a way, which is to send an email to...
asked by 28.11.2017 / 17:35
2
answers

Sessions from different systems on the same server

Scenario (example) I have 2 systems: Bakery System Posto System Details The database is separate , then each system with its users and passwords. There is "regular user" between the 2 (eg john.silva) Problems If I do...
asked by 10.01.2018 / 11:52
1
answer

Array conversion with json_encode PHP

Oops, does anyone know why when I do this: json_encode(array("0" => 0)); Return this: [0] Instead: {"0":0}     
asked by 14.07.2015 / 00:52
2
answers

Why is X-Powered-by answering headers important? How to remove?

Why is it important to remove% with% of response headers? Does this prevent some kind of attack, or do you prevent "inside information" from the attacker? Example: X-Powered-By: PHP/5.5.9-1ubuntu4.11 And what are the possible ways in...
asked by 05.08.2015 / 17:31
2
answers

List Tree Categories in Laravel 5.1

I'm starting with Laravel 5.1 and I'm a bit lost yet. I need to list categories, subcategories and "sub-subcategories". Table: Categorias ------------------------ id | int nome | varchar categoria_pai | int Data:...
asked by 11.08.2015 / 19:53