0

Hi I'm trying to integrate a google checkout button with a basic php variable - and am having trouble with formatting. Here is the code:

echo "<h2>" . $row['name'] ."</h2>";
        echo '<form action="xxx" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" target="_top">
    	<input name="item_name_1" type="hidden" value="Item"/>
    	<input name="item_description_1" type="hidden" value="Watch Repair Service"/>
    	<input name="item_quantity_1" type="hidden" value="1.00"/>
    	<input name="item_price_1" type="hidden" value="1.00"/>
    	<input name="item_currency_1" type="hidden" value="USD"/>
    	<input name="_charset_" type="hidden" value="utf-8"/>
    	<input alt="" src="" type="image"/>
			</form>';

I'm trying to replace the "value" with the database field named 'due', but I don't know how to properly place the variable within the input value field. I guess it's an issue with syntax. The issue is that the price fluctuates based on the customers particular repair job - and I need the google checkout button to be dynamic.

Any help would be greatly appreciated.

Thanks

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by justinmyoung
0

Something like
<input name="item_price_1" type="hidden" value=$due />

should work.

I tried that but google returns an error page after pressing the button. Not sure why.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.