![]() |
|
? |
![]() PHP FAQ PHP Articles PHP Help Bulletin Board PHP Manual (NEW!) First Time PHP'ers Help with programming Sql assignment help PHP Homework Help C# Help
|
? |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?Reply To This Message | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?Your Name: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?Your Email: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?Subject: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Email replies to this thread, to the address above. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
??wrote: > > i notices a little error in the code here > //if img_type optional - then check for it and use if needed > if ($img_type!="na"){ > $query1.=" image_type in (".'$img_type'.")"; > } > > s/b > > //if img_type optional - then check for it and use if needed > if ($img_type!="na"){ > $query1.=" image_type in ('".$img_type."')"; > } > and here as well > > $query1.=" and extension in ('".$ext_type."')"; > > and same for subject...the quotes should be inside the normal > query text and not surrounding the variable...better fix 'em up > > also since the values are text and not numeric, the array > needs to be handled differently since we need single_quote > item end_single_quote like 'bmp' to check a value (I had > assumed numeric not seeing the form itself...) > > so we need to handle the array something similar to the > search string array > > $num=count($_POST['extension']; > if ($num==1){ > $ext_type="'".$_POST['extension']."'"; > }elseif ($num>1){ > for ($x=0;$x<$num;$x++){ > if ($x==0){ > //first element so no comma separator needed > $ext_type.="'".$_POST['extension']."'"; > }else{ > //add the comma separator > $ext_type.=",'".$_POST['extension']."'"; > } //close if then > }//close for loop > }else{ > //no elements so set to "na" > $ext_type="na"; > } > > > hope this helps get it ">??![]() |