Friday, April 2, 2010

help with shopping cart (own code -...

hello

i am in the VERY early stages of putting together a shopping cart. in fact, i'm only experimenting with a few techniques at the moment, and am only using code, no specialist packages.there is no css formatting at the moment.

i have created this page, http://www.malcmabe.co.uk/custdetails.php?from there you can add a username and password. this works fine.

the next step is to press click on the search for an item link. type in 'nike' and press the search button. this brings up items, as expected.

you can then click on an item link to see an item summary.

this is where it goes wrong. if you click on the 'add to my basket' link, this is code is executed:

if(isset($_POST['addtobasket']))
{
?echo(''add to basked posted'');
?mysql_query(''INSERT INTO checkout (username, brand, item, price)
VALUES ('$username', '$gotbrand', $gotitem, '$gotprice')'');

}

--the value variables are correct as i have already echoed them on the page. i have double checked the column names over and over, they are correct.

the problem is, nothing is getting inserted into the checkout table.

i get no sql errors whatsoever

any ideas?

*** Malcolm, I've changed the subject line a little - so that people are aware that you need some php help, not advice on shopping cart software per se.

[Thread moved by moderator to Dreamweaver Application Development forum]

help with shopping cart (own code -...

ok, cheers

MALCOLM

No comments:

Post a Comment