Jump to content

Recommended Posts

First, to say that I really appreciate all the help from this forum!

 

Still on the shopping cart problem... the mysql database has two tables: cart and items please see details below.

 

What I am trying to do is create a mailform to send out details of the customer selections to the \"shop\".

 

So far the following is working:

 

$result = mysql_query(\"SELECT * FROM cart\",$con);

 

if ($result === false) die(\"failed\");

 

while ($row=mysql_fetch_row($result)) {

 

$content .= \"Ref no:\" .$row[2].\"nqty: \".$row[3].\"nn\";}

 

This sends the ref no and quantity from the table cart.

 

What I wish to do AS WELL is to send itemName and itemPrice from the table items.

 

Any ideas please?

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

table items:

 

Field Type Attributes Null Default Extra Action

itemId int(11) No auto_increment Change Drop Primary Index Unique Fulltext

itemName varchar(50) Yes NULL Change Drop Primary Index Unique Fulltext

itemDesc varchar(250) Yes NULL Change Drop Primary Index Unique Fulltext

itemPrice decimal(4,2) Yes NULL Change Drop Primary Index Unique Fulltext

 

>>>>>>>>>>>>>>>>>>>>

 

>>>>>>>>>>>>>>>>>>>>

table cart:

 

Field Type Attributes Null Default Extra Action

cartId int(11) No auto_increment Change Drop Primary Index Unique Fulltext

cookieId varchar(50) Yes NULL Change Drop Primary Index Unique Fulltext

itemId int(11) Yes NULL Change Drop Primary Index Unique Fulltext

qty int(11) Yes NULL Change Drop Primary Index Unique Fulltext

 

>>>>>>>>>>>>>>>>>>>>

Link to comment
https://forums.phpfreaks.com/topic/703-join-tables-and-send-email/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.