Hi All,

The form below is set to pass data to paypal, however I cant seem to get it to work when using variables recieved from a $_POST.

I get an error from paypal stating........

"The link you have used to enter the PayPal system contains an incorrectly formatted item amount."

all im trying to pass through is a variable 1.

Any advice would be appreciated.



<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
<input type="hidden" name="cmd" value="_cart"> 
<input type="hidden" name="business" value="email@email.com"> 
<input type="hidden" name="add" value="1"> 
<input type="hidden" name="item_name" value="test"> 
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="amount" value="<?php echo $price ?>"> 
<input type="image" src="https://www.paypal.com/images/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it’s fast, free and secure!"> 

I could be wrong as my php is not that strong, but your echo statement looks incorrect

try <?php echo($price); ?>

Also are you setting the value of $price? i.e. you're not sending a null value are you?

Hi Thanks for the response.

I found the issue. My own stupid fault. I have a habit of concatenating line breaks, so when i was passing what i thought was 1, it was actually 1<br>