Page 1 of 1

php and mysql

Posted: Sun Mar 21, 2004 2:11 pm
by negar
i have a CustDetails table with attributes
ID
Username
....

and

Products table with attributes
ProdID
Prodname
....

and

cart table with attributes
cartID
ProdID
ID

i was wondering there was any way that when a user selects the add item link that the item is added to the cart table but also the ProdID and the users ID. i need an insert statement that will link the CustDetails.ID to cart.ID and Products.ProdID to cart.ProdID.
can anyone help me?
Thanx

Posted: Sun Mar 21, 2004 6:25 pm
by Steveo31
Maybe...

INSERT INTO cartID, prodID, userID VALUES ('$cartID', '$prod', '$name');

?