How to integrate php form with PayPal?
Posted: Wed Sep 30, 2009 11:08 am
On my paypal Thank You page I need to echo a php form IF a user donates over say $30. I have tried populating the posted amount into a variable, and then echoing the variable into my function but have no luck.
My code is as follows:
The problem is not with the form itself, but rather the communication of the variable "amt" working with the paypal $amount. I am a designer and have been banging my head
over this particular problem for too long now and i believe it is something very minor that needs changing.
All and any help is much appreciated.
My code is as follows:
Code: Select all
<?php
$amount = $_POST['amt'];
if ($amount >= 1) {
echo "
<p>Enter your email address if you would like to receive email forecasts directly from the Colorado Avalanche Information Center.</p>
<form action='' method='post'><table><tr><td>Your Email:</td><td><input name='email'></td></tr></table>
<input type='submit' value='send'></form>";
} else {
echo ("<p>Thank you for your donation of $amount.</p>");
}
?>
The problem is not with the form itself, but rather the communication of the variable "amt" working with the paypal $amount. I am a designer and have been banging my head
All and any help is much appreciated.