This page illustrates how you create an Add item to cart button for use in the shopping cart. This may be used in situations where you have existing text on a web page and just want to add a button at an appropriate place.

The button can be placed on any web page format - it can be a PHP page or an ordinary html page.

<form action="http://www.yourservername/ipnmonitor/cart/viewcart.php" method="post">
<input type="hidden" name="item_number" value="item1" >
<input type="hidden" name="from" value="http://www.yourservername/ipnmontior/cart/button.php" >
<input type="hidden" name="action" value="add">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" alt="Add item to cart">
</form>

The fields that you enter to create the button (those in bold text) are :
The 'action' url is the full url of viewcart.php and will be http://www.yourservername/ipnmonitor/cart/viewcart.php assuming that you have installed PHP-IPNMonitor at the root of your web site in a folder called 'ipnmonitor'.
The value of the 'item_number' field is the item number for the product you wish to create the button for. This is the value that you entered in the Products display in the admin pages.
The value of the 'from' field is the full url of the page that the button is placed on and is used by the viewcart.php page to know where the to return to.
The image can be any of the PayPal images or one of your own.

When you click on the Add item button, you are taken to the viewcart.php page where you may remove items or complete the purchase.

In addition to the add item button you also need a vew cart button as follows :

<form action="http://www.yourservername/ipnmonitor/cart/viewcart.php" method="post">
<input type="hidden" name="from" value="http://localhost/withinweb/ipnmonitor/cart/button.php" >
<input type="image" src="https://www.paypal.com/en_US/i/btn/view_cart_02.gif" alt="view cart">
</form>

The fields that you enter to create the button (those in bold text) are :
The 'action' url is the full url of viewcart.php and will be http://www.yourservername/ipnmonitor/cart/viewcart.php assuming that you have installed PHP-IPNMonitor at the root of your web site in a folder called 'ipnmonitor'.
The value of the 'from' field is the full url of the page that the button is placed on and is used by the viewcart.php page to know where the to return to.
The image can be any of the PayPal images or one of your own.