I'm making an ecommerce site and I'm currently trying to implement my cart using Paypal.
I have a table of products created via the following code:
<?php
while($row=mysql_fetch_array($result)) {
?>
<tr>
<td><?php echo $row['name'] ?></td>
<td><?php echo $row['description'] ?></td>
<td>£<?php echo $row['price'] ?></td>
<td><?php echo $row['stockLevel'] ?></td>
<td><!--Add to cart button will go here--></td>
</tr>
<?php
}
?>
This is going through my table and getting the component details and showing them through a table. Now with Paypal add to cart buttons you have to enter the details of a product manually (e.g. Enter the products name, price etc) and then Paypal generates it for you on its site so you can just copy/paste the HTML. I was wondering if there was a way of doing what I am doing now whereby I am populating the table via the database, but also creating a Paypal button which links to that component at the same time so I wouldn't have to create a seperate button for each component?