Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PHP3] Inquiry Basket!!!

0 views
Skip to first unread message

Mark Lo

unread,
Feb 22, 2000, 3:00:00 AM2/22/00
to
Hi,

I know this is off topic...but a bit related to PHP...because I
want to create a system using PHP/MySQL....Please help....The function
of
the system is that people can pick the items they want like shopping
cart and stored in the basket...once they check out each individual item

will send to the supplier that supply the goods (May be more than one
supplier).

anyone has the cue!!!!

Thank you


--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-uns...@lists.php.net
To subscribe to the digest, e-mail: php3-diges...@lists.php.net
To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-lis...@lists.php.net


alain samoun

unread,
Feb 22, 2000, 3:00:00 AM2/22/00
to

Richard Lynch

unread,
Feb 22, 2000, 3:00:00 AM2/22/00
to
At 03:17 AM 2/22/00 +0800, you wrote:
>Hi,
>
> I know this is off topic...but a bit related to PHP...because I
>want to create a system using PHP/MySQL....Please help....The function
>of
>the system is that people can pick the items they want like shopping
>cart and stored in the basket...once they check out each individual item
>
>will send to the supplier that supply the goods (May be more than one
>supplier).
>
>anyone has the cue!!!!

Just off the top of my head...

<?php
$query = "select product.name, supplier.email from cart, products,
suppliers ";
$query .= "where cart.productid = products.productid ";
$query .= "and products.supplierid = suppliers.supplierid ";
$query .= "order by suppliers.supplierid ";
$fulfillment = mysql_query($query);
$from = "From: mark...@netvigator.com\r\nReply-To:
mark...@netvigator.com\r\n";
$message = "Please ship the following products to $customer\r\n\r\n";
//Kind of gnarly to have to seed it like this, but...
list(, $lastsupplier = mysql_fetch_row($fulfillment);
mysql_data_seek($fullfillment, 0);
while (list($product, $supplier) = mysql_fetch_row($fulfillment)){
if ($lastsupplier != $supplier){
mail($lastsupplier, 'Order', $message, $from);
$message = "Please ship the following products to $customer\r\n";
$lastsupplier = $supplier;
}
$message .= "$product\r\n";
}
if ($message){
mail($lastsupplier, 'Order', $message, $from);
}
?>

--
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com http://EmphasisEntertainment.com
http://L-I-E.com http://JadeMaze.com
http://CatCatalani.com http://MGMH.com
http://VoodooKings.net http://UncommonGround.com

Gary Bickford

unread,
Feb 22, 2000, 3:00:00 AM2/22/00
to
Check out Fishcart (http://www.fishcart.org), PHPClasses
(http://phpclasses.upperdesign.com), PHPBuilder (http://www.phpbuilder.com),
PHPLib (http://phplib.shonline.de), and/or the PHP Links page
(http://www.php.net/links.php3

Mark Lo wrote:

> Hi,
>
> I know this is off topic...but a bit related to PHP...because I
> want to create a system using PHP/MySQL....Please help....The function
> of
> the system is that people can pick the items they want like shopping
> cart and stored in the basket...once they check out each individual item
>
> will send to the supplier that supply the goods (May be more than one
> supplier).
>
> anyone has the cue!!!!

--
"Cyber is cyber, life is life."
Gary E Bickford mailto:ga...@fxt.com
Consultant http://www.fxt.com/
FXT Corporation tel:541-383-2749
mail:PO BOX 1808, SISTERS OR 97759
ship:66265 JERICHO ROAD, BEND OR 97701

0 new messages