Page 1 of 1

select - drop down menu problem :(

Posted: Thu Jul 27, 2006 2:27 am
by SomeOne
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


i have a code like this...

Code: Select all

if ( isset ($_GET['dirselect'] )) {
$dir_select = ($_GET['dirselect']);
  echo $dir_select;
  } 
  echo '$dir_select not assigned';
?>
<form method="post" action="<?php $_SERVER['PHP_SELF']  ?>">
<select name="dirselect">
<?php
	   $path = "./slike";
      if ($handle = opendir($path))
   {
       $curDir = substr($path, (strrpos(dirname($path."/."),"/")+1));
       print "Trenutna mapa: ".$curDir."<br>"; 
       while (false !== ($file = readdir($handle)))
       {
           if ($file != "." && $file != "..")
           {
               $fName = $file;
               $file = $path.'/'.$file;
               if(is_dir($file))

               {
                   print "\n<option value=$fName>$fName</option>";
               }
           }
       }
       
	   closedir($handle);
   }  
?>
</select>
  <input type="submit" name="Shrani" value="spremeni" />
</form>
Though...this is not working for me...
im trying to list subfolders of current folder and make drop down menu...and when i select options and press "subbmit" button ..the selected options stored in variable...(so i can chdir later)...
HELP???? any?? 8O


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Thu Jul 27, 2006 10:35 am
by feyd
You've already asked this question.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:3. Do not make multiple, identical posts. This is viewed as spam and will be deleted.