I'm kinda confused right now with this function I'm trying to edit. I would like to add the mysql_fetch_array to the feedback string. I'm pretty sure it's possible but can somebody point out the problem for me? The piece of code I'm trying to execute is in comments. And where's PRINTHERE, that where I want the mysql_fetch_array to spit out the results. Thx a lot!
foreach($_FILES as $k => $v){
$img_type = "";
### $htmo .= "$k => $v<hr />"; ### print_r($_FILES);
if( !$_FILES[$k]['error'] && preg_match("#^image/#i", $_FILES[$k]['type']) && $_FILES[$k]['size'] < $max_image_size ){
$img_type = ($_FILES[$k]['type'] == "image/jpeg") ? ".jpg" : $img_type ;
$img_type = ($_FILES[$k]['type'] == "image/gif") ? ".gif" : $img_type ;
$img_type = ($_FILES[$k]['type'] == "image/png") ? ".png" : $img_type ;
$img_rname = $_FILES[$k]['name'];
$img_path = $upload_dir.$img_rname;
copy( $_FILES[$k]['tmp_name'], $img_path );
if($enable_thumbnails) make_thumbnails($upload_dir, $img_rname);
/*
mysql_connect("localhost", "", "") or die(mysql_error());
mysql_select_db("");
$result = mysql_query("SELECT * FROM gallery_main ORDER BY datetime DESC");
while($row = mysql_fetch_array($result))
{
$name=$row['name'];
echo "<option value='$name'>$name</option>";
}
*/
$feedback .="<style>.stap1{display:none;}.stap2{display:block;}</style>
<input name='src' style='width:400px;' type='hidden' value=\"$img_rname\"><br />
<input name='thumbsrc' style='width:400px;' type='hidden' value=\"thumb_$img_rname\"><br />
<select name='galleryname' id='galleryname'>PRINTHERE";
}
}