Questions tagged as 'php'

1
answer

error with arlert function that I created

I have created a very simple alert function in php. It works, however, with a problem. Whenever I call it like this: Alert("Pedido finalizado"); It works, but when I put a \ n to have a break if line, it does not work. Example: Alert("...
asked by 15.08.2016 / 15:17
1
answer

Html with laravel 5.2 [closed]

I have a button in my index. I want to call another page like I do in laravel 5.2? Was it through the routes?     
asked by 14.08.2016 / 01:05
1
answer

Align form items with CSS

Hello, I would like some help to align the items in the following form. I would like the labels of the selects to be above the same as the labels of the inputs. Additionally I would like the selects, the imputs and the buttons to be aligned in t...
asked by 22.08.2016 / 18:18
2
answers

How to see the queries that were executed by eloquent in Laravel?

How can I find out which queries have been executed in Laravel? For example, I have the following query: $usuarios = Usuario::with('nivel')->where(['status' => 1])->get(); I would like to know which queries were executed. Can yo...
asked by 24.08.2016 / 15:09
2
answers

Get id onclick and send values via Ajax

I have a list of tasks, it has the status part, which shows for example 'In Test' and a Approve button. I'm trying to get this Approve button when clicked, grab the Task Id and send an update to it to change its status. But so far I...
asked by 29.08.2016 / 21:28
1
answer

Set a default zoom for google maps

Good morning, I have a question about google maps. I have a location map of a company, but I would like to place a default zoom, for example, zoom 3, which when opening the page, zoom 3 automatically. <iframe width="940" height="368"...
asked by 30.09.2016 / 13:40
2
answers

How to insert all array values and avoid $ query-execute () at every execution of foreach?

How to insert all array values and avoid $query->execute() with each foreach execution? $_POST = json_decode(file_get_contents('php://input'), true); $sql = "INSERT INTO teste(nome, email) VALUES (:nome, :email)"; try{ $query=...
asked by 30.12.2016 / 16:36
2
answers

Get value from within a function

I have a logic problem here, I think it must be a "dumb" thing on my part, like I have to get a value from within the function, and I'm not getting a return for being an http request. look: $scope.postData = function(method, data, file){...
asked by 10.01.2017 / 14:27
1
answer

Error trying to log in PHP

I created a basic login with php for the site I'm developing, but when trying to log in, the following error occurs: "invalid user or password" , this error is in the code, but I do not understand why it happens, since I already checke...
asked by 16.01.2017 / 20:10
2
answers

Setting execution timeout to infinity can affect server performance?

Generally, I see a lot of people (including myself I've had) run-time issues with a PHP script. This is because, by default, PHP sets a time limit for running a script in 30 seconds. These problems usually occur when PHP is working on a lengt...
asked by 09.01.2017 / 19:20