Paypal api, php, form
<?php
$action=$_REQUEST['action'];
if ($action=="")
{
?>
<center>
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="example@example.com">
<input type="hidden" name="currency_code" value="AUD">
<input type="hidden" name="item_name" value="Donation">
<input type="number" name="amount" value="10">
<br>
<input type="image" src="http://www.bgclubfc.org/donate-Now.gif"
width="150px" height="50px" border="0" name="submit" alt="Make
payments with PayPal - it's fast, free and secure!">
</form>
</center>
<?php
}
else
{
$amount=$_REQUEST['amount'];
if (($amount==""))
{
echo "All fields are required, please fill <a href=\"\">the
form</a> again.";
}
else{
mail("example@example", "donatoin", $amount);
echo "Email sent!";
}
}
?>
Okay here is my code what I am after in the end is a donation to be made
using paypal then the value being added to my sql database and then the
data being relayed back to another page with a goal bar. I have very
limited ability so could some one please help me how to fix it thank you.
No comments:
Post a Comment