Hi,

I have zencart installed in a subdirectory (public_html/trades/) of a domain, I also have a website on public_html/.

I want to use the website to collect data using a form which will post the data to zencart as a product.

I have been struggling with it for a while and am having a problem with a few things and hoped that someone maybe able to help me.

Whats happening is when the form is processed it runs a mysql statement:

Code:
$query = "INSERT INTO zen_products (products_model, products_quantity, products_image, products_date_added, products_status) VALUES ('$model','3','product.jpg', NOW(), '1')";
$query = "INSERT INTO zen_categories_description (categories_name) VALUES('$county')";
What im having dificulty with is the categories bit. It will put put the data into the categories_name, but it will duplicate the category name and it doesnt show in admin > categories/products either.

I am presuming that I need to post the categories_id instead of the categories_name, but I have no idea how to set that up on my form processor.

I have tried using an array but thats not working either:

Example:
Code:
$county[Dublin]='1';
$county[Roscommon]='2';
$county[Galway]='3';
$county[Westmeath]='4';
I have no idea where to go from here. I will keep trying, but if anyone has a solution or can point me in the right direction, i will be their best friend :)

dropbop