Questions tagged as 'php'

1
answer

Optimize informative page

I have a page that receives monthly information, to display the month that the user wants to do: <a href="?mes=ago2015" class="list-group-item <?=($mes=='ago2015')?'active':''?>" id="ago2015">Agosto / 2015</a> And call...
asked by 10.12.2015 / 10:33
1
answer

Division of integers

Hello, I want to do a type calculation: I want to distribute for example 6 integers into 5 other numbers starting at 0 getting more or less like this: 2 1 1 1 1 or for example 3 integers in 5 numbers that start counting from zero: 1 1 1...
asked by 03.06.2016 / 16:59
2
answers

JS parameter for PHP file

Hello .. I have a problem in which I am encountering difficulties, perhaps due to my lack of knowledge in JS. I have a JavaScript function that calls a PHP file: <script type='text/javascript'> ... events: "events.php" </script&g...
asked by 23.05.2016 / 05:46
2
answers

Catching CSS classes interspersed using jQuery

I need to know how to get interspersed CSS classes. Well I'm going to do a loop and I need to get the classes in a certain number. The code is as follows: <div class="box"></div> <div class="box"></div> <div class...
asked by 05.06.2016 / 22:46
1
answer

Ajax and php protection

Using ajax in my case, can it bring some security flaw? If so, how do I solve it? javascript: $(function() { if($('#login_submit').length !== 0) { $('#login_submit').on('click', function() { if(!$('#login_submit').hasCl...
asked by 21.07.2015 / 00:43
1
answer

How to pass an array as parameters or arguments?

I have two functions: function example($param1, $param2) { echo $param1 . $param2; } function frutas($fruta1, $fruta2, $fruta3) { echo $fruta1 . $fruta2 . $fruta3; } I also have a variable that gets the parameters of the functions...
asked by 28.05.2016 / 01:17
2
answers

how to tell if the date is of the date type yyyy-mm-dd, dd / mm / yyyy etc?

The question becomes even more difficult: The field data_cadastro is like varchar , I have several tables and each one has a different type of date, for example: in a table there is: 2015-12-01; in the other: 12/07/2015;...
asked by 15.07.2015 / 14:36
1
answer

How to connect PHP with SQLServer via PDO

I'm using the following code: try { $con = new PDO("sqlsrv:Server=172.20.21.193,9090;Database=sgt","deb","123123"); $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { die ("Erro na co...
asked by 07.07.2015 / 19:31
1
answer

View routes in CodeIgniter

I downloaded a real estate script that was made with CodeIgniter , the problem is that I'm trying to see where the controllers and views is, since I went in the application/controllers folder and application/views a...
asked by 20.05.2015 / 07:09
1
answer

Update in Laravel 5 a field receiving the value of another field from the same table

I have a configuration table in my database that has the following fields: ["id", "texto", "textoOriginal"] . Initially the values of the texto field are equal to the textoOriginal field, but the user can at any given time ch...
asked by 22.05.2015 / 23:12