Questions tagged as 'php'

1
answer

How to create validation to ask if the user really wants to leave the page? [duplicate]

I have a page where the user will edit fields that are in a form. This data comes from the database. The user can edit them, however, in the end he can write (that is, he will write / do update in the database) or he can close. I want to ma...
asked by 29.09.2016 / 13:54
1
answer

Pass parameters using the guzzle client

I need to consume an api, passing the parameters are done this way:    link I'm using guzzle to make the request. I am instantiating the client with the url base of this form: $client = new Client(['base_url' => 'https://api.typ...
asked by 28.09.2016 / 14:52
1
answer

Div of type input radius

Well, what I want is the following. I have several divs, and they have inputs of the type "radios", that is, when people click on the div, it gets bordered. Instead of having the radius ball, people clicking the div is like selecting this...
asked by 02.11.2016 / 20:13
1
answer

Dynamic forms on the same page in Jquery and PHP

I'm trying to make a comment portal, so I'll have a text input on every POST for people to comment, these POSTS will be on the same page (Facebook style), as well as the inputs, which will have to be dynamic. I made this function using Jquery...
asked by 27.10.2016 / 08:34
1
answer

Interpreting XML file tags with PHP

I'm having trouble interpreting an XML file with PHP. The difficulty I have is not being able to get the values according to your tag. The xml loop brings that difficulty to me. Here's a summary of it: <?xml version="1.0"?> <root>...
asked by 06.01.2017 / 14:18
1
answer

Pass error variables between two php files

Hello I'm trying to validate a form in different files, but I can not pass the error messages between them. In index.php I have the form code: <!DOCTYPE html> <html> <head> <title>Great Train Journe...
asked by 11.01.2017 / 16:44
1
answer

Pecorating XML with php

Colleagues. I have the following XML. <gabarito> <avaliacao tipo="Prova" codigo="01" segmento="Ensino Médio" serie="Pré-Vestibular" questoes="20"> <disciplina nome="Matemática"> <questao numero="1" alt...
asked by 20.04.2016 / 18:31
1
answer

Browser message after AJAX request

I have an ajax request responsible for sending a file to the servlet, it is performing the process correctly. But when I update the page the following message is displayed by the browser (When I give an f5):    The page you are looking for ha...
asked by 21.04.2016 / 17:33
1
answer

Include gets wrong path from url

I have the following structure: Iwouldlikethefileinsideviews/usuarios/usuarios-view.phptoincludethefile_layout.htmlthatisinthepath:views/_template/_layout.html,I'mdoingsoinusuarios-view.php:<?phpinclude("../_template/_layout.html"); ?>...
asked by 27.04.2016 / 22:08
1
answer

Are static methods equivalent to functions?

In OOP we have the static methods (do not depend on any instance variable). Citing examples: class Somar { public static function soma($a,$b){ return $a+$b; } } echo Somar::soma(20,30); The equivalent of the static method...
asked by 18.04.2016 / 15:02