Jump to content

How To Integrate Paypal With A Php Form.


Recommended Posts

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:

<?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='amt'></td></tr></table>				  <input type='submit' value='submit'></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 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.You can view the thank you page at http://friendsofcaic.org/thankyou.php

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...