Category : PHP

PHP

How to Receive Single Product Payment Via Paypal

If you have only one or two product for that you can use simple paypal buy Now. I will tell you the whole process now in detail. First, go to paypal.com or from here. give the product name / price etc. second step, put the code at you product page where you want to. Third step, make another page (download page) for download link of your product. When users click on buy now they will make payment and then redirect to that page (download page). that’s it !

Now, two important things you should know, you have place redirection URL (download page) following this process –

1) login to paypal
2) click “edit profile) next to your name / email address
3) click “website payment preferences” under “selling preferences”
4) click “on” for “auto-return”
5) you must enter a return URL, even if you have separate ones for various products and/or payments from various sites that may take precedence over this one.
6) click save

another one is, you have make download link page nofollow , noindex. If you dont do this. people may find your download link in Google search. use this plugin “Ultimate Noindex Nofollow Tool” to do this. just put the page ID, that it will turned into noindex, nofollow.

Thats All About This !! Thanks !!

Read More
PHP

A “Retirement Saving Calculator”

Today i am again practice GET , POST methods and develop a simple calculator that calculate retirement benefits. You have to input just your present age, age you retire, annual contribution and the return percentage.

<form action="" method="post">
Your age now : <input type="text" name="currentage" />
 
The age you plan to retire : <input type="text" name="retireage" />
 
Annual Contribution : <input type="text" name="contrib" />
 
Annual return : <input type="text" name="anngain" /> %
 
<input type="submit" name="submit" value="calculate" />
 
NEST EGG : <!--?php echo "$total"; ?-->
 
</form>

Here is a simple form and you have to send and receive data with a simple logical operation.

<?php 
if(!isset($_POST['submit']) || $_POST['submit'] !='calculate'){
    $_POST['currentage']="";
    $_POST['retireage']="";
    $_POST['contrib']="";
    $total=0;
    $anngain=7;
}
else{
    $anngain=$_POST['anngain'];
    $years = $_POST['retireage'] - $_POST['currentage'];
    $yearcount=0;
    $total= $_POST['contrib'];
 
    while($yearcount<=$years){
        $total=$total*(1.0+$anngain/100)+$_POST['contrib'];
        $yearcount=$yearcount+1;
    }
}
 
?>

So, Not so difficult. But i have one confusion still… LoL

You can test this simple calculator here

You can find this at php Bible / Chapter – 6

Read More