Location: PHPKode > projects > @1 File Store > control/folders/add.php
<?
require_once("const.php");

$smarty->assign("action", $lang['add_folder']);
$form["submit"]=$lang['add'];
if($_SERVER["REQUEST_METHOD"]==$form["method"])
{
 $userform->load($form["fields"], $_POST);
 $form["errorcount"]=$userform->check($form["fields"]);
 if($form["errorcount"]==0)
 {
  $SQL="INSERT INTO `".DB_PREFIX."folders` SET ".$userform->sql($form["fields"]);
  if(!$mysql->query($SQL))
  {
   exit($mysql->error);
  }
  Header("Location:index.php");
  exit();
 }
}

$smarty->assign("form", $form);
$smarty->display("control/form.tpl");
?>
Return current item: @1 File Store