Questions tagged as 'php'

1
answer

Return Purchase status on automatic return of notification PagSeguro

Does anyone know how to identify the payment statuses in the automatic return of the pagseguro notifications? For example, if the user made the payment then my notification.php file receives a post from the pagseguro, but in this post can not id...
asked by 19.06.2015 / 15:29
3
answers

Create post in a wordpress and bring in another wordpress automatically

Options: Create a new POST in one wordpress-1, from another wordpress-2. or Everything you create in wordpress-2 be "copied" to wordpress-1 or Create / Register a product in a store -1, from another store -2. [RESOLVED] I...
asked by 27.05.2015 / 21:09
1
answer

How to make a pie chart with database?

I have the table in my database called votes, in it I have id, name and votes, I wanted to plot those values being, name and value in a pie chart or what is the percentage of votes each name <? $SQL1 = "SELECT * FROM votes"; $...
asked by 25.04.2014 / 21:27
2
answers

Integrating PayPal ExpressCheckout in PHP

For some time now I've been researching how to integrate PayPal into my online stores, the ones I build myself from 0 to the final stage of payment, but when I went to the PayPal website to find out more about the integration, (Name-Pair-Value),...
asked by 30.03.2014 / 22:34
7
answers

Can you use a variable above when it is declared below?

I have some includes in a PHP page, including other pages for use in friendly URL, etc. I thought about using Global variables and even constants, but it is not working. Does anyone know if there is a way without using Cookies, Sessions, or C...
asked by 09.03.2014 / 20:06
2
answers

Automatic PHP Function

I need every day, the system send shipping requests to the post office. How can I do this automatically, without needing a user to load the page or anything? I would use the same logic of doing something automatically without user interaction...
asked by 05.04.2016 / 19:35
1
answer

Is it correct to create a variable within an if?

Is it correct to create a variable within an if? In the code below, you create a variable inside the if, and avoid using the same filter twice. if($id = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT)): /* Código */ endif; What do...
asked by 06.04.2016 / 22:02
1
answer

Is it a good practice to have the same name with the column name of the bank?

Let's say I have a input text de name="txtnome" , is it a good practice to have a column of the same name as this input in my table? Being that I'm using PDO for CRUD $st =$this->db->prepare("UPDATE $tabela SET yxtnome=:t...
asked by 11.05.2016 / 04:33
4
answers

Array passing by PHP array

Save personal, I have the following function exec($dia, $mes, $ano); I would like to make a foreach to run it through an array basis. I passed as follows $a=array("1,2,2016", "2,2,2016","3,2,2016"); foreach($a as $as){ exec($as) }...
asked by 17.03.2016 / 19:36
3
answers

Merge arrays in php

Someone knows something that makes this: $name = [0=>'name1',1=>'name2']; $email = [0=>'email1',1=> 'email2']; In this here? $data = [ 0 => ['name'=>'name1', 'email'=>'email1'], 1 => ['name'=>'name2', 'email'=&...
asked by 02.08.2014 / 22:10