Questions tagged as 'php'

1
answer

Problem with search and pagination in Laravel?

The code below returns all the records of the database and also searches for the term typed in input of search with pagination. The problem is that by clicking for example on page 2 it already refreshes the page returning all the recor...
asked by 25.05.2017 / 22:50
1
answer

Pass Jquery variable to PHP

I'm with this script that brings the geolocation of the user: (function() { if(!!navigator.geolocation) { var map; var mapOptions = { }; map = new google.maps.Map(document.getElementById('google_canvas'), mapOptions);...
asked by 25.05.2017 / 12:23
1
answer

Error trying to save txt

Personal good morning,  I have this code block: $delimitador = ';'; $cerca = '"'; $VarDataAux = ''; // Abrir arquivo para leitura $f = fopen($_FILES['arquivo']['tmp_name'], 'r'); if ($f) { // Ler cabecalho do arquivo...
asked by 30.06.2017 / 13:34
1
answer

How do I echo PHP to Ajax? Login System

I'm working on a sign-in system that warns the user if the username already exists in the database. Basically I have a popup window on the same page where the input fields are for both login and user registration. The idea was to submit the fiel...
asked by 28.06.2017 / 19:00
3
answers

Send message after the click of the submit button

How do I identify with PHP if a submit button was clicked? and after the click I want to send a click confirmation message !. Detail everything in PHP. !!! So it is not working not <form method="POST"> <input type="text" name...
asked by 28.06.2017 / 22:38
1
answer

Retrieve all checked checkboxes

I have this code that returns a list of the bank with a checkbox next to each, however when I send it via post it only takes the last one marked and not all: Example with vardump where I marked all: array(2) { ["seriais"]=> string(10) "3...
asked by 25.04.2017 / 16:42
1
answer

Read Json in PHP?

I have the following code in my PHP : <?php $url = "https://api.cartolafc.globo.com/mercado/destaques"; $response = file_get_contents($url); $jogadores = json_decode($response,true); It should return the file json ,...
asked by 27.04.2017 / 01:07
1
answer

Error updating AUTO INCREMENT

I have the following code: $sql='ALTER TABLE tributos_prod AUTO_INCREMENT=:ultimo_id'; try { $query_delete=$conecta->prepare($sql); $query_delete->bindValue('ultimo_id', $ultimo_idTP+1, PDO: : PARAM_STR); $query_delete->ex...
asked by 18.07.2017 / 19:46
1
answer

Count only new records in the database and submit as notifications

I have the following question, I need to return in a panel that there are records that are not being displayed on the screen. Type I have 10 records being displayed, are registered 2 more then I need to show a notification similar to that of Fac...
asked by 17.07.2017 / 19:27
1
answer

Break does not work in foreach

I have a foreach inside another foreach that will rotate by several values of a specific object. But I need to stop both foreach's when it goes into if, but the break command does not work for some reason, it just keeps running both forea...
asked by 16.03.2017 / 15:13