[thelist] reworded MySQL query insert and back again

rudy r937 at interlog.com
Tue Feb 11 16:15:00 CST 2003


> this is the bit that is really doing my head in...

don't let it get you down   ;o)


> this is the display for the color select

well, we have come full circle, then, because that's where we started

> echo "<SELECT name=\"ColorName\" value=\"$ColorName\">";
> showColor($II);
> echo "</SELECT> ";

yes, but according to an earlier posting, this php function actually runs a
query which apparently pulls back the item's **already selected** colours,
and as i previously mentioned, i don't see why you are listing the already
selected colours in a dropdown list if you then turn around and try to
insert them into your temp table using the id and not the name

your php code says

    echo "<option value=\"$size_id\">$size</option>";

and that looks fine to me

you put the key value in the value and let the user choose by name

then you insert the key value in the temp table

then to "display items on checkout" you join the keys back to the name table

unless you design the form to pass the name in the option value

i mean, there are so many ways to design this, and they're all up to you!


i think we've lost anyone who might still be following this thread, so all i
can suggest is that you contact me offlist for further debugging assistance

my consulting rates for evolters is quite reasonable   ;o)


rudy




More information about the thelist mailing list