Hi guys Please can you help me to modify my code? I need to enter the amount value before post to the website like paypal, and then when I enter the login details and when I click the pay button, I want the amount to be process before sending and store to mysql database. Here it is the code: <?php require_once('auth.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>My Profile</title> <link href="loginmodule.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="member-index.php">Back</a> <h1 align="center">Deposit</h1> <input name="formtext1" type="text" style="position:absolute;width:105px;left:351px;top:89px;z-index:0"> <div id="text1" style="position:absolute; overflow:hidden; left:194px; top:92px; width:155px; height:21px; z-index:1"><div class="wpmd"> <div align=right>Add Fund: £ </div> </div></div> <input name="formbutton1" type="submit" value="Submit" style="position:absolute;left:372px;top:120px;z-index:2"> </body> </html> PHP: When I enter the amount value on the textbox and I click submit button, nothing is working. Please help!!!!!!!!!!!! Thanks, Mark
I don't think you're asking the question very clearly. What it SOUNDS like you are asking for is code that allows you to put a price into an input field, then hit submit, and the page is sent to paypal with that price. If so, you could do this fairly easily. With Paypal, they offer you the option to have a "buy now" button in link form. This allows you to easily add the variable "amount" into the URL. You can then have the form processed on a separate page where it inserts the amount and uses the header() function to send the user to Paypal. So in the end your code would look something like this. <input type="text" name="amount" /> HTML: <? $amount = $_POST['amount']; $location = "http://www.paypal.com?amount=$amount"; header("Location: $location"); ?> PHP: