Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7527639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:09:21+00:00 2026-05-30T04:09:21+00:00

I am looking to create a donate and Dowload script that allows you to

  • 0

I am looking to create a donate and Dowload script that allows you to put in your own money amount and then it automatically downloads and takes you to paypal. 0 needs to be an option amount also. Here is an example: http://www.losttype.com/font/?name=liberator

I have created a PayPal donate script and edited to add an input amount, but can anyone suggest a way to automatically start the download and allow 0 as an amount?


Maybe I should start again, I have the following code that allows the user to donate with paypal. This has an input amount, and redirects the user to paypal in a new window.
What would be the best way to on submit to start the download? even if the person puts in zero, and while they can donate in another window.
Code:

<div class="donate">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="myemail">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="info">
<table> <tr><td>Enter your Amount:</td></tr><tr><td><input type="text" name="amount"     value=""></td></tr> </table>
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
<input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_donate_LG.gif" border="0" name="submit">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:09:22+00:00Added an answer on May 30, 2026 at 4:09 am

    Easy enough really. Detect whether an amount has been chosen, and if it has, redirect to PayPal.
    If it hasn’t, redirect directly to the file.

    Below is a very basic, unchecked example:

        <?php
    
        echo "<p>Donate fixed amount to CharityName</p>
        <form method='POST' action=''>
        <select name='currency_code'>
        <option value='EUR'>EUR</option>
        <option value='GBP'>GBP</option>
        <option value='USD'>USD</option>
        <input type='text' name='donate_amount' value='0'>
        <input type='submit' name='submit' value='Donate'></form>";
    
        if(!empty($_POST['submit'])) {
        // Form has been submitted
          if($_POST['donate_amount'] > 0) {
        // Redirect to PayPal
        header('Location: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&item_name=Donation for XXX&amount='.$_POST['donate_amount'].'&currency_code='.$_POST['currency_code'].'&business=mypaypalemail@here.tld&cbt=Download the file&return=http://link-to-the-file&cancel_return=http://back-to-my-website');
        }
        else {
        // No donation amount entered - proceed to file directly
        header('Location: http://link-to-the-file/');
        }
    }
    
        ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I were looking to create my own language are there any tools that
I'm looking to create my own custom domain specific language that outputs HTML. Basically,
I'm looking to create a grouped style UITableView that allows a user to select
I am looking to create a php script that detects twitter style hashtags from
I looking to create a custom calender with Zend Framework, I am hoping that
Im looking to create a control that would look like comic baloon. In WPF
im looking to create thumbnails that has 100px by 100px dimension. i've seen many
I am looking to create a Nav Bar in my Android application that functions
I'm looking to create an Application Object Server that is sitting between Window form
I'm looking create a piece of jQuery logic that answers: Are there any tables

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.