|
Posted by Christa Lee on 09/25/05 07:30
Hi there,
I'm trying to write a shopping cart program for my web site
(www.dmwebproductions.com/toque) and I am a little lost.
First, if you look at the web site, I need to be able to register a number
of values for one variable (array). So I guess my question is this: how do
you register an array?
This is my code so far:
<?php
session_start();
include("getup.php");
$_POST['Quantity,Size,Colour,Style,BrandName'];
$connection = mysql_connect($host, $user, $dbpassword)
or die ("Couldn't connect to server.");
$db = mysql_select_db($database, $connection)
or die ("Couldn't select databse.");
session_register('$itemcount');
$itemcount++;
$tempslot = $itemcount .= "item";
$tempslot = array ( "Style" => "$Style" , "Brand" => "$BrandName" ,
"Colour" => "$Colour" , "Size" => "$Size" ,
"Quantity" => "$Quantity" );
session_register('$tempslot');
header("Location: index.php?page=shoppingcart");
?>
If someone can tell me where I'm going wrong or if someone has an example
shopping cart for a clothing web site, please HELP ME!
I would really like to have this web site ready to go by October and the
shopping cart is the biggest obstacle I have to tackle as I have never
created a shopping cart using any programming language. I am decently versed
in PHP but the shopping cart is new to me.
Thanks in advance!
Dimitri Marshall
www.dmwebproductions.com/toque
(soon to be www.toquewear.com)
[Back to original message]
|