I have form with checkboxes, however, I am unable to pass through more than one option. I read a post about not using implode, (I currently have two references to implode) which may be my problem but I am not good enough yet at php to be able to figure out if this in fact the problem, and if so, what exactly to change. I have listed the relevant part of the code below:
echo "<input type=hidden name='customer_input' value='FALSE'>";
echo " <b>".implode(", ",$titles)."</b><br>";
$var="";
for($i=0;$i<sizeof($d);$i++)
{
$var.="for(\$i$i=0;\$i$i<sizeof(\$d[$i]);\$i$i++)\n";
}
$var.="{\n";
$oid=array();
$val1=array();
$price1=array();
$var1 = array();
for($i=0;$i<sizeof($d);$i++)
{
$var1[]="\$d[$i][\$i$i][text]";
$price1[]="\$d[$i][\$i$i][price]";
$oid[]= "\$d[$i][\$i$i][oid]";
$val1[]="\$d[$i][\$i$i][id]";
}
$var2="";
for($i=0;$i<sizeof($oid);$i++)
{
$var2.="this.form['id[\".".$oid[$i].".\"]'].value=\".$val1[$i].\";";
$var.="\$attr1[".$oid[$i]."]=".$val1[$i].";\n";
}
$var2.="this.form.customer_input.value='TRUE';";
$var.="ksort(\$attr1);\n";
$var.="\$price2=".implode("+",$price1).";\n";
$var.='if (!tep_check_stock_new($HTTP_GET_VARS[products_id],$attr1,1)) {$sa1[';
$var.="\"<input type=checkbox name=some1[] onclick=\\".'"'.$var2."\\".'"'." ##checked##>\".".join(".\", \".",$var1).".\" \"";
$var.=".\"(\".\$currencies->display_price(\$price2,0).\")<br>\\n\"]=\$price2;}\n";
$var.="}\n";
$var.="if (sizeof(\$sa1)) {asort(\$sa1);\n";
$var.="\$sel='';foreach(array_keys(\$sa1) as \$sa) { \$sa=str_replace('##checked##',\$sel,\$sa); \$sel=''; echo \$sa;}}else{ echo 'This product is currently unavailable!';}";
Thanks in advance, I have been struggeling with this for over a day now.