Hi Ray,
I am trying to convert the dynamic array in dropdown boxes to use with MySqli.
I have had reasonable success but keep geeting the error " Undefined variable: row_getResults in .......on line 106" and I can't seem to resolve it.
Can you help at all please my script as is, is below. It seems to be the first line that is causing the problem.
<?php
if ($row_getResults) {
echo "<SC" . "RIPT>\n";
echo "var WAJA = new Array();\n";
$oldmainid = 0;
$newmainid = $getResults->getColumnVal("colourID");
if ($oldmainid == $newmainid) {
$oldmainid = "";
}
$n = 0;
while ($getResults) {
if ($oldmainid != $newmainid) {
echo "WAJA[".$n."] = new Array();\n";
echo "WAJA[".$n."][0] = '".WA_DD_Replace($newmainid)."';\n";
$m = 1;
}
echo "WAJA[".$n."][".$m."] = new Array();\n";
echo "WAJA[".$n."][".$m."][0] = "."'".WA_DD_Replace($row_getResults["SizeID"])."'".";\n";
echo "WAJA[".$n."][".$m."][1] = "."'".WA_DD_Replace($row_getResults["item_size"])."'".";\n";
$m++;
if ($oldmainid == 0) {
$oldmainid = $newmainid;
}
$oldmainid = $newmainid;
$row_getResults = mysqli_fetch_assoc($getResults);
if ($row_getResults) {
$newmainid = $getResults->getColumnVal("colourID");
}
if ($oldmainid != $newmainid) {
$n++;
}
}
echo "var getResults_WAJA = WAJA;\n";
echo "WAJA = null;\n";
echo "</SC" . "RIPT>\n";
}
?>