Questions tagged as 'php'

1
answer

Move specific value in PHP Array

I have a connection via api with a third party system, I am getting the values in this format: Array ( [code] => 200 [data] => Array ( [subscription_id] => 2752 [status] => new [custom_id] => [charges] => Array ( [0] => Ar...
asked by 30.08.2016 / 01:37
2
answers

PHP Redirect

Is there any API and / or function, in PHP, that redirects the pages of my site, according to the locality of the person? Example: If it is not BR, redirect to the English page.     
asked by 23.06.2016 / 20:07
2
answers

Validating input file with ajax request

$(document).ready(function() { $('.formulario').submit(function() { $.ajax({ url: 'enviar.php', type: 'POST', data: $('.formulario').serialize(), success: function(valor) { $('.resp').ht...
asked by 21.06.2016 / 19:04
2
answers

Sorting all elements of a multidimensional array

I need to sort the array below in alphabetical order using the numeric key: Array ( [AM] => Array ( [1] => Array ( [localidade] => Arena da Amazonia [cida...
asked by 23.06.2016 / 18:59
2
answers

Could not access file: Array and syntax error, unexpected '$ name' (T_VARIABLE) [closed]

I am using PHPMailer to send an email with attachment by a form, my code has no errors, but when I finish the form and press send, it returns an error but that the email was sent. Code: $name=$_REQUEST['name']; $email=$_REQUEST['email'];...
asked by 04.12.2015 / 15:08
1
answer

Count records only if greater than the current datetime, with count ()

I have the following query : SELECT u.nome, u.email, u.login, u.data_cadastro, COUNT(*) AS qtd FROM patrocinadores AS p LEFT JOIN anuncios AS a ON a.id_user = p.id_user INNER JOIN usuarios AS u ON u.id = p.id_user WHERE p.id_patrocinado...
asked by 05.12.2015 / 02:39
1
answer

Show the highest value of a field, together with the field name

Hello, I have a huge question. I need to show in my table, on the home page of my site, which field in my table has the highest value and next to this field, show not only the highest value but also the name of the person who has this value....
asked by 01.12.2015 / 01:17
1
answer

How to list only the highlighted image of a post?

How can I show on my page only the highlighted images, without titles and description on my page? This is my structure: <?php $args = array( 'posts_per_page' => 1, 'category_name' => 'primeiro-conceito' ); $myposts = g...
asked by 01.12.2015 / 19:05
1
answer

Table multiplying the data

Well, I've had this problem for some time and I would like the help of you, I have 3 tables that would be sale, vendaproduto, vendaservico. and I insert the sales table items into the other two tables with the following code: mysql_quer...
asked by 15.12.2015 / 13:47
3
answers

Select current date [closed]

I need a select that pulls all records from the current date table (today), without informing the date, in the sql-server and how the syntax would look in PHP as well. Since I have a column named DtBase that stores the dates of the reco...
asked by 14.03.2016 / 17:24