mysql
web2newyork asked:


I want to add categories to a companies database. Based on another tutorial I made three tables:

companies
categories
lookup_category

lookup_category somehow stores the relationship between the other two, but the tutorial’s example code was full of errors and gaps, so I’m stuck.

What’s the most efficient/flexible way to add “a categories dimension” to a collection of records in MySQL? Can anyone give a stripped down working example without BS?

Thanks!

Comments

just "JR" on 14 October, 2008 at 9:39 am #

You can’t check checkboxes in Php, but you can set values in javascript that will be passed to Php:
the form:

function js_check(theForm)
{
if (theForm.elements['checkbox1'].checked)
theForm.elements['phpbox1'].value = 1;
if (theForm.elements['checkbox2'].checked)
theForm.elements['phpbox2'].value = 1;
}
Your receiving Php script reads phpbox#. If set to 1, then box is checked.


Post a Comment
Name:
Email:
Website:
Comments: