<?php

include('includes/hlava.php');
title('Klub priateľov fotografie', '');

if ($link) {
  if ($db_selected) {
  
include('includes/vedla.php');
odkaz('');
include('includes/menu.php');
menu('forum','');
?>


        <div class="obsah"> 

<?php

/*tak ked pouzijes $names =  explode(";",$string);
a mas v $string hodnotu palo;jozo;fero
tak v 
$names[1] bude palo
$names[2] bude jozo
$names[3] bude fero

a ked budes generovat select sprav nieco taketo*/

  if (isset($_POST["submit"])){
    if (isset($_POST['text']) && ($_POST['text'] != '')){
      $names =  explode("; ",$_POST['text']);
      echo '<form class="login"><select>';
      echo '<option value="NULL" selected="selected">Vyber kategoriu!</option>';
      foreach($names as $i => $z) {
        echo '<option value="'.$z.'">'.$z.'</option>';
        //echo ''.$z.'<br />';
      }
      echo '</select></form>';
    }
  }

?>        
           
          <form class="login" action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post" enctype="multipart/form-data">
            <p>
              <textarea name="text" cols="45" rows="4"></textarea><br />
              <input class="ok" name="submit" type="submit" value="posli"/>
            </p>
          </form>
<?php
        		}   
	   mysql_close($link);   
 
	}
 
include('includes/pata.php');
?>
