Hello GaryORLFC,
Without seeing the source code I can't tell you exactly how to implement this, but if you're using the usual HTML form method for PayPal you can just add the service charge to the "amount" field.
If you post your code in the code tags, I can have a proper look at it for you.
$connect = mysql_connect("localhost","organis2_admin","dublin") or die("Could not connect to the database.");
mysql_selectdb("organis2_project") or die("Could not find the database.");
if (isset($_GET['add'])) {
$quantity = mysql_query('SELECT id, quantity FROM shoppingcart WHERE id='.mysql_real_escape_string((int)$_GET['add']));
while ($quantity_row = mysql_fetch_assoc($quantity)) {
if ($quantity_row['quantity']!=$_SESSION['quantity_'.(int)$_GET['add']]) {
$_SESSION['quantity_'.(int)$_GET['add']]+='1';
}
}
header('Location: '.$page);
}
if (isset($_GET['remove'])) {
$_SESSION['quantity_'.(int)$_GET['remove']]–;
header('Location:'.$page);
}
if (isset($_GET['delete'])) {
$_SESSION['quantity_'.(int)$_GET['delete']]='0';
header('Location:'.$page);
}
function products(){
$get = mysql_query('SELECT id, product, description, price FROM shoppingcart WHERE quantity > 0 AND id BETWEEN 1 AND 2 ORDER BY id DESC');
if (mysql_num_rows($get)==0){
echo "There are no products to display.";
}
else{
while($get_row = mysql_fetch_assoc($get)){
echo '
function products1(){
$get = mysql_query('SELECT id, product, description, price FROM shoppingcart WHERE quantity > 0 AND id BETWEEN 3 AND 5 ORDER BY id DESC');
if (mysql_num_rows($get)==0){
echo "There are no products to display.";
}
else{
while($get_row = mysql_fetch_assoc($get)){
echo '
Also, could someone help me out with the quantity part of the code?
I want to be able to type in the number of items that I want instead of having to click [+] a certain amount of times.
So, a form data that lets you input, let's say 7 of a specific item, and then when you click "Add to Cart" it will add 7 to the cart.
✨ Ask AI
AI can make mistakes. Check the cited posts. Archived advice can be out-of-date
Don't include personal information. Questions and selected public posts go to OpenAI. About Ask AI