Questions tagged as 'php'

1
answer

$ _FILES does not work [duplicate]

EDIT: Even if you put the ENCTYPE tag on form, the problem persists. I'm trying to use $_FILES for the first time, and I'm experiencing difficulties. It's like he does not get anything. Look at the code I'm using. HTML: <form id...
asked by 24.12.2015 / 00:50
1
answer

Loading PHP into JS is a good practice? [duplicate]

I see quite often in some questions here from SOpt some codes that can PHP variables within scripts in JS. Let's assume that the file below is index.php . <?php $var = "Me mostre"; ?> <script> function mostrar...
asked by 22.01.2016 / 14:05
3
answers

Route access control - Laravel 5.1

I have some views that only clients can access, and some that only administrators can access. What I defined in the case is the client_id, which if "1" is an administrator and if it is any other client. I control this with 2 Middleware locally,...
asked by 27.01.2016 / 15:31
2
answers

What do the incrementing operators do in arrays?

I was accidentally creating a PHP script and, unintentionally, put an incremental operator on a variable whose type is array . To my surprise, no error was shown by PHP. I made some tests and found that this really does not generate...
asked by 14.12.2015 / 14:35
2
answers

Set date / time from user-entered month

I have the month entered by the user. ex: $mes = 11; Now I want to take this month and return the current (day / year / hour) + the month informed: 2015-11-08 14:44:00     
asked by 08.12.2015 / 19:45
3
answers

How to make the data appear in the fields in AngularJS

I am entering with a zip and a search is done and brings me the other data ... However, I want the data to be displayed, each in its own field, as it will be inserted into the database. How to proceed? html: <body ng-controller="appContr...
asked by 20.01.2016 / 21:30
1
answer

AES in PHP is secure?

I am planning to deploy AES in an area of an intranet that is under development so that the user can save important data such as account passwords and passwords for accessing servers, as well as transferring data through an API for servers exter...
asked by 06.08.2015 / 06:47
3
answers

How to remove the last character, save the result to a variable and use the variable outside the foreach?

I have a code PHP like this: foreach ($rows as $obj) : $all_ids = $obj->ID . ', '; endforeach; .. whose output is 125, 148, 157, 169, 185, How to remove the last comma and save the rest of the output in a variable...
asked by 30.07.2015 / 01:59
1
answer

How to do ranking with PHP

Well, I have a problem, I know how to pull the ranking and everything. My doubt is that I'm going to pull the 6 with the highest score, and I wanted the top 3 to have a different background, like: Whats the first thing: yellow; O second...
asked by 26.07.2015 / 04:17
2
answers

List generated with JSON data

I'm having trouble querying data from a JSON file within a list in HTML. I put my prototype in the Plunker . Script ... $.getJSON("list.json", function (json){ //alert("Carregou o list.json"); var states = json.states; var...
asked by 31.07.2015 / 22:25