Page 1 of 1

mkdir help

Posted: Mon Jan 30, 2006 8:12 pm
by xtreemgt
Im currently working on an application and would appreciate some help. I have a signup form that users will fill out and what I would like to happen is once they submit the form than it would take the variable from the username field and create a folder with it. For example: the main site is http://www.domain.com. I want the folder to be created under http://www.domain.com/site/users/$username. Any help would be much appreciated.
]
Mike

Posted: Mon Jan 30, 2006 8:54 pm
by josh
You are looking for http://www.php.net/mkdir


Or instead of physically creating directories you can make the directories appear as if they exist and pull content from the database, if this is what you want then search this forum, apache.org or google.com for "mod_rewrite"

Posted: Mon Jan 30, 2006 9:04 pm
by John Cartwright
if you are interested in the mod rewrite way, have a discussion on the exact same situation

viewtopic.php?t=43500&highlight=

Posted: Tue Jan 31, 2006 7:58 am
by xtreemgt
To answer your questions the mod_rewrite wont work for me. I need an actual folder for each user that signs up. So my questions is if I use this command mkdir ("users/'loginname'", 0700) what do I use for a command to pull the username from the username field on submit and create an actual folder for that user?

Posted: Tue Jan 31, 2006 9:20 am
by Jenk
After carefull validation of the $username variable and removing any nasty chars (non-alphanum should suffice, and allow underscores if you are feeling generous)

Code: Select all

<?php

$username = preg_replace('/[^a-z0-9_]/i', '', $username);

if (strval($username) != '') {
    if (!is_dir("users/{$username}")) {
        mkdir("users/{$username}", 0700);
    } else {
        die ('User name/directory already exists!');
    }
} else {
    die ('Invalid user name/directory!');
}

?>

Posted: Tue Jan 31, 2006 10:25 am
by xtreemgt
Ok Im really struggling with this problem. The code above looks like it will do what I want it to do. Now my other problem. I need the code to be call once the form is submitted. So below is what I did.

I defined it

Code: Select all

$add_folder = ("../includes/tng/create_folder.php");
Than I am calling it up on submit like this:

Code: Select all

<input type="submit" name="KT_Insert1" id="KT_Insert1" value="<?php echo NXT_getResource("Insert_FB"); ?>",'$add_folder' />

Im sure my code is wrong but if someone could point me in the right direction I would appreciate it. Im not getting an error on submit but when I check the folders its just not there.

Posted: Tue Jan 31, 2006 1:58 pm
by ddragas
Try with these

Code: Select all

<?

	if(isset($_POST['KT_Insert1']))
		{
			
			$username=$_POST['username'];
			
			
			$main_path = "../your/main/path/" . $user . "/"; 
			
			if (!is_dir($main_path)) 
	            { 
			       mkdir ($main_path, 0777); 
			       chmod ($main_path, 0777); 
				   echo "New folder " . $user . " created!";
			   }
			
		}		
			
	echo "<form id=\"form\" name=\"form\" method=\"post\" action=\"\">";
    echo "<input type=\"text\" name=\"username\" />";
    echo "<input name=\"KT_Insert1\" type=\"submit\" id=\"KT_Insert1\" value=\"Some value\" />";
	echo "</form>";	
?>

Posted: Tue Jan 31, 2006 2:35 pm
by xtreemgt
Ok im not having much luck with this and getting very frustrated. I've included the code for the whole page so you can see what I'm dealing with.

Code: Select all

<?php require_once('../Connections/join1.php'); ?>

    
<?php
// Load the common classes
require_once('../includes/common/KT_common.php');


// Load the tNG classes
require_once('../includes/tng/tNG.inc.php');

// Load the KT_back class
require_once('../includes/nxt/KT_back.php');

// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("../");

// Make unified connection variable
$conn_join1 = new KT_connection($join1, $database_join1);

// Start trigger
$formValidation = new tNG_FormValidation();
$formValidation->addField("loginname", true, "text", "", "5", "", "Please enter atleast 5 letters or numbers");
$formValidation->addField("loginpassword", true, "text", "", "5", "", "Please enter atleast 5 letters or numbers");
$tNGs->prepareValidation($formValidation);
// End trigger

// Make an insert transaction instance
$ins_sitebox_users = new tNG_multipleInsert($conn_join1);
$tNGs->addTransaction($ins_sitebox_users);

// Register triggers
$ins_sitebox_users->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");
$ins_sitebox_users->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$ins_sitebox_users->registerTrigger("END", "Trigger_Default_Redirect", 99, "welcome.php");
// Add columns
$ins_sitebox_users->setTable("sitebox_users");
$ins_sitebox_users->addColumn("isadmin", "NUMERIC_TYPE", "POST", "isadmin", "0");
$ins_sitebox_users->addColumn("isactive", "NUMERIC_TYPE", "POST", "isactive", "1");
$ins_sitebox_users->addColumn("isprofile", "NUMERIC_TYPE", "POST", "isprofile", "1");
$ins_sitebox_users->addColumn("lastaccessed", "DATE_TYPE", "POST", "lastaccessed");
$ins_sitebox_users->addColumn("loginname", "STRING_TYPE", "POST", "loginname");
$ins_sitebox_users->addColumn("loginpassword", "STRING_TYPE", "POST", "loginpassword");
$ins_sitebox_users->addColumn("changepassword", "NUMERIC_TYPE", "POST", "changepassword");
$ins_sitebox_users->addColumn("ftphost", "STRING_TYPE", "POST", "ftphost", "69.64.33.211");
$ins_sitebox_users->addColumn("ftpuser", "STRING_TYPE", "POST", "ftpuser", "always");
$ins_sitebox_users->addColumn("ftppassword", "STRING_TYPE", "POST", "ftppassword", "tobey321");
$ins_sitebox_users->addColumn("passivemode", "NUMERIC_TYPE", "POST", "passivemode", "0");
$ins_sitebox_users->addColumn("rootdirectory", "STRING_TYPE", "POST", "rootdirectory", "/httpdocs/site/users");
$ins_sitebox_users->addColumn("startingdirectory", "STRING_TYPE", "POST", "startingdirectory", "/users/");
$ins_sitebox_users->addColumn("fullurl", "STRING_TYPE", "POST", "fullurl", "http://www.alwaysloveme.com/site/users/");
$ins_sitebox_users->addColumn("imagedirectory", "STRING_TYPE", "POST", "imagedirectory", "/images");
$ins_sitebox_users->addColumn("flashdirectory", "STRING_TYPE", "POST", "flashdirectory", "/flash");
$ins_sitebox_users->addColumn("hiddendirectories", "STRING_TYPE", "POST", "hiddendirectories");
$ins_sitebox_users->addColumn("maxfilesize", "NUMERIC_TYPE", "POST", "maxfilesize", "2048");
$ins_sitebox_users->addColumn("maximagesize", "NUMERIC_TYPE", "POST", "maximagesize", "2048");
$ins_sitebox_users->addColumn("maximagewidth", "NUMERIC_TYPE", "POST", "maximagewidth", "0");
$ins_sitebox_users->addColumn("maximageheight", "NUMERIC_TYPE", "POST", "maximageheight", "0");
$ins_sitebox_users->addColumn("sitebuilderpages", "NUMERIC_TYPE", "POST", "sitebuilderpages", "6");
$ins_sitebox_users->addColumn("editablefiletypes", "STRING_TYPE", "POST", "editablefiletypes", "htm, html, inc, txt, php");
$ins_sitebox_users->addColumn("noneditablefiletypes", "STRING_TYPE", "POST", "noneditablefiletypes", "bmp, gif, jpg, pdf");
$ins_sitebox_users->addColumn("linkfiletypes", "STRING_TYPE", "POST", "linkfiletypes", "htm, html, txt, jpg, gif, pdf, doc, xls");
$ins_sitebox_users->addColumn("imagefiletypes", "STRING_TYPE", "POST", "imagefiletypes", "gif, jpg, jpeg");
$ins_sitebox_users->addColumn("spellchecklanguage", "STRING_TYPE", "POST", "spellchecklanguage", "1");
$ins_sitebox_users->addColumn("singlelinereturn", "NUMERIC_TYPE", "POST", "singlelinereturn", "0");
$ins_sitebox_users->addColumn("tablebordersonbydefault", "NUMERIC_TYPE", "POST", "tablebordersonbydefault", "0");
$ins_sitebox_users->addColumn("restrictedediting", "NUMERIC_TYPE", "POST", "restrictedediting", "1");
$ins_sitebox_users->addColumn("outputxhtml", "NUMERIC_TYPE", "POST", "outputxhtml", "1");
$ins_sitebox_users->addColumn("displayImageThumbs", "NUMERIC_TYPE", "POST", "displayImageThumbs", "1");
$ins_sitebox_users->addColumn("absolutepaths", "NUMERIC_TYPE", "POST", "absolutepaths", "1");
$ins_sitebox_users->addColumn("allowcreate", "NUMERIC_TYPE", "POST", "allowcreate", "0");
$ins_sitebox_users->addColumn("allowcreatefolder", "NUMERIC_TYPE", "POST", "allowcreatefolder", "0");
$ins_sitebox_users->addColumn("allowcreateimagefolder", "NUMERIC_TYPE", "POST", "allowcreateimagefolder", "1");
$ins_sitebox_users->addColumn("allowdelete", "NUMERIC_TYPE", "POST", "allowdelete", "0");
$ins_sitebox_users->addColumn("allowdeleteimage", "NUMERIC_TYPE", "POST", "allowdeleteimage", "1");
$ins_sitebox_users->addColumn("allowrename", "NUMERIC_TYPE", "POST", "allowrename", "0");
$ins_sitebox_users->addColumn("allowrenameimage", "NUMERIC_TYPE", "POST", "allowrenameimage", "1");
$ins_sitebox_users->addColumn("allowcopy", "NUMERIC_TYPE", "POST", "allowcopy", "1");
$ins_sitebox_users->addColumn("allowcopyimage", "NUMERIC_TYPE", "POST", "allowcopyimage", "1");
$ins_sitebox_users->addColumn("allowupload", "NUMERIC_TYPE", "POST", "allowupload", "0");
$ins_sitebox_users->addColumn("allowuploadimage", "NUMERIC_TYPE", "POST", "allowuploadimage", "1");
$ins_sitebox_users->addColumn("docrootoverride", "STRING_TYPE", "POST", "docrootoverride", "0");
$ins_sitebox_users->addColumn("altscriptname", "STRING_TYPE", "POST", "altscriptname");
$ins_sitebox_users->addColumn("alturl", "STRING_TYPE", "POST", "alturl");
$ins_sitebox_users->addColumn("modes", "STRING_TYPE", "POST", "modes", "101");
$ins_sitebox_users->setPrimaryKey("pk_userid", "NUMERIC_TYPE");


// Make an update transaction instance
$upd_sitebox_users = new tNG_multipleUpdate($conn_join1);
$tNGs->addTransaction($upd_sitebox_users);
// Register triggers
$upd_sitebox_users->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1");
$upd_sitebox_users->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$upd_sitebox_users->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
// Add columns
$upd_sitebox_users->setTable("sitebox_users");
$upd_sitebox_users->addColumn("isadmin", "NUMERIC_TYPE", "POST", "isadmin");
$upd_sitebox_users->addColumn("isactive", "NUMERIC_TYPE", "POST", "isactive");
$upd_sitebox_users->addColumn("isprofile", "NUMERIC_TYPE", "POST", "isprofile");
$upd_sitebox_users->addColumn("lastaccessed", "DATE_TYPE", "POST", "lastaccessed");
$upd_sitebox_users->addColumn("loginname", "STRING_TYPE", "POST", "loginname");
$upd_sitebox_users->addColumn("loginpassword", "STRING_TYPE", "POST", "loginpassword");
$upd_sitebox_users->addColumn("changepassword", "NUMERIC_TYPE", "POST", "changepassword");
$upd_sitebox_users->addColumn("ftphost", "STRING_TYPE", "POST", "ftphost");
$upd_sitebox_users->addColumn("ftpuser", "STRING_TYPE", "POST", "ftpuser");
$upd_sitebox_users->addColumn("ftppassword", "STRING_TYPE", "POST", "ftppassword");
$upd_sitebox_users->addColumn("passivemode", "NUMERIC_TYPE", "POST", "passivemode");
$upd_sitebox_users->addColumn("rootdirectory", "STRING_TYPE", "POST", "rootdirectory");
$upd_sitebox_users->addColumn("startingdirectory", "STRING_TYPE", "POST", "startingdirectory");
$upd_sitebox_users->addColumn("fullurl", "STRING_TYPE", "POST", "fullurl");
$upd_sitebox_users->addColumn("imagedirectory", "STRING_TYPE", "POST", "imagedirectory");
$upd_sitebox_users->addColumn("flashdirectory", "STRING_TYPE", "POST", "flashdirectory");
$upd_sitebox_users->addColumn("hiddendirectories", "STRING_TYPE", "POST", "hiddendirectories");
$upd_sitebox_users->addColumn("maxfilesize", "NUMERIC_TYPE", "POST", "maxfilesize");
$upd_sitebox_users->addColumn("maximagesize", "NUMERIC_TYPE", "POST", "maximagesize");
$upd_sitebox_users->addColumn("maximagewidth", "NUMERIC_TYPE", "POST", "maximagewidth");
$upd_sitebox_users->addColumn("maximageheight", "NUMERIC_TYPE", "POST", "maximageheight");
$upd_sitebox_users->addColumn("sitebuilderpages", "NUMERIC_TYPE", "POST", "sitebuilderpages");
$upd_sitebox_users->addColumn("editablefiletypes", "STRING_TYPE", "POST", "editablefiletypes");
$upd_sitebox_users->addColumn("noneditablefiletypes", "STRING_TYPE", "POST", "noneditablefiletypes");
$upd_sitebox_users->addColumn("linkfiletypes", "STRING_TYPE", "POST", "linkfiletypes");
$upd_sitebox_users->addColumn("imagefiletypes", "STRING_TYPE", "POST", "imagefiletypes");
$upd_sitebox_users->addColumn("spellchecklanguage", "STRING_TYPE", "POST", "spellchecklanguage");
$upd_sitebox_users->addColumn("singlelinereturn", "NUMERIC_TYPE", "POST", "singlelinereturn");
$upd_sitebox_users->addColumn("tablebordersonbydefault", "NUMERIC_TYPE", "POST", "tablebordersonbydefault");
$upd_sitebox_users->addColumn("restrictedediting", "NUMERIC_TYPE", "POST", "restrictedediting");
$upd_sitebox_users->addColumn("outputxhtml", "NUMERIC_TYPE", "POST", "outputxhtml");
$upd_sitebox_users->addColumn("displayImageThumbs", "NUMERIC_TYPE", "POST", "displayImageThumbs");
$upd_sitebox_users->addColumn("absolutepaths", "NUMERIC_TYPE", "POST", "absolutepaths");
$upd_sitebox_users->addColumn("allowcreate", "NUMERIC_TYPE", "POST", "allowcreate");
$upd_sitebox_users->addColumn("allowcreatefolder", "NUMERIC_TYPE", "POST", "allowcreatefolder");
$upd_sitebox_users->addColumn("allowcreateimagefolder", "NUMERIC_TYPE", "POST", "allowcreateimagefolder");
$upd_sitebox_users->addColumn("allowdelete", "NUMERIC_TYPE", "POST", "allowdelete");
$upd_sitebox_users->addColumn("allowdeleteimage", "NUMERIC_TYPE", "POST", "allowdeleteimage");
$upd_sitebox_users->addColumn("allowrename", "NUMERIC_TYPE", "POST", "allowrename");
$upd_sitebox_users->addColumn("allowrenameimage", "NUMERIC_TYPE", "POST", "allowrenameimage");
$upd_sitebox_users->addColumn("allowcopy", "NUMERIC_TYPE", "POST", "allowcopy");
$upd_sitebox_users->addColumn("allowcopyimage", "NUMERIC_TYPE", "POST", "allowcopyimage");
$upd_sitebox_users->addColumn("allowupload", "NUMERIC_TYPE", "POST", "allowupload");
$upd_sitebox_users->addColumn("allowuploadimage", "NUMERIC_TYPE", "POST", "allowuploadimage");
$upd_sitebox_users->addColumn("docrootoverride", "STRING_TYPE", "POST", "docrootoverride");
$upd_sitebox_users->addColumn("altscriptname", "STRING_TYPE", "POST", "altscriptname");
$upd_sitebox_users->addColumn("alturl", "STRING_TYPE", "POST", "alturl");
$upd_sitebox_users->addColumn("modes", "STRING_TYPE", "POST", "modes");
$upd_sitebox_users->setPrimaryKey("pk_userid", "NUMERIC_TYPE", "GET", "pk_userid");

// Make an instance of the transaction object
$del_sitebox_users = new tNG_multipleDelete($conn_join1);
$tNGs->addTransaction($del_sitebox_users);
// Register triggers
$del_sitebox_users->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Delete1");
$del_sitebox_users->registerTrigger("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.php");
// Add columns
$del_sitebox_users->setTable("sitebox_users");
$del_sitebox_users->setPrimaryKey("pk_userid", "NUMERIC_TYPE", "GET", "pk_userid");

// Execute all the registered transactions
$tNGs->executeTransactions();

// Get the transaction recordset
$rssitebox_users = $tNGs->getRecordset("sitebox_users");
$row_rssitebox_users = mysql_fetch_assoc($rssitebox_users);
$totalRows_rssitebox_users = mysql_num_rows($rssitebox_users);


?>
<html>
<head>
<title>Join</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" />
<script src="../includes/common/js/base.js" type="text/javascript"></script>
<script src="../includes/common/js/utility.js" type="text/javascript"></script>
<script src="../includes/skins/style.js" type="text/javascript"></script>
<?php echo $tNGs->displayValidationRules();?>
<script src="../includes/nxt/scripts/form.js" type="text/javascript"></script>
<script src="../includes/nxt/scripts/form.js.php" type="text/javascript"></script>
<script type="text/javascript">
$NXT_FORM_SETTINGS = {
  duplicate_buttons: false,
  show_as_grid: true,
  merge_down_value: true
}
</script>

</head>

<body>
<?php
	echo $tNGs->getErrorMsg();
?>
<div class="KT_tng"> 
  <h1> Join Now </h1>
  <div class="KT_tngform"> 
    <form method="post" id="form1" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>">
      <?php mkdir($newdir); ?>
	  <?php $cnt1 = 0; ?>
      <?php do { ?>
      <?php $cnt1++; ?>
      <?php 
// Show IF Conditional region1 
if (@$totalRows_rssitebox_users > 1) {
?>
      <h2><?php echo NXT_getResource("Record_FH"); ?> <?php echo $cnt1; ?></h2>
      <?php } 
// endif Conditional region1
?>
      <table cellpadding="2" cellspacing="0" class="KT_tngtable">
        <tr> 
		  <td class="KT_th"><label for="loginname_<?php echo $cnt1; ?>">Username:</label></td>
		  

          <td><input type="text" name="loginname_<?php echo $cnt1; ?>" id="loginname_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['loginname']); ?>" size="32" maxlength="50" /> 
            <?php echo $tNGs->displayFieldHint("loginname");?> <?php echo $tNGs->displayFieldError("sitebox_users", "loginname", $cnt1); ?> </td>
       
		</tr>
        <tr> 
          <td class="KT_th"><label for="loginpassword_<?php echo $cnt1; ?>">Password:</label></td>
          <td> <input type="text" name="loginpassword_<?php echo $cnt1; ?>" id="loginpassword_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['loginpassword']); ?>" size="32" maxlength="50" /> 
            <?php echo $tNGs->displayFieldHint("loginpassword");?> <?php echo $tNGs->displayFieldError("sitebox_users", "loginpassword", $cnt1); ?> </td>
        </tr>
      </table>
      <input type="hidden" name="kt_pk_sitebox_users_<?php echo $cnt1; ?>" class="id_field" value="<?php echo KT_escapeAttribute($row_rssitebox_users['kt_pk_sitebox_users']); ?>" />
      <input type="hidden" name="isadmin_<?php echo $cnt1; ?>" id="isadmin_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['isadmin']); ?>" />
      <input type="hidden" name="isactive_<?php echo $cnt1; ?>" id="isactive_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['isactive']); ?>" />
      <input type="hidden" name="isprofile_<?php echo $cnt1; ?>" id="isprofile_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['isprofile']); ?>" />
      <input type="hidden" name="lastaccessed_<?php echo $cnt1; ?>" id="lastaccessed_<?php echo $cnt1; ?>" value="<?php echo KT_formatDate($row_rssitebox_users['lastaccessed']); ?>" />
      <input type="hidden" name="changepassword_<?php echo $cnt1; ?>" id="changepassword_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['changepassword']); ?>" />
      <input type="hidden" name="ftphost_<?php echo $cnt1; ?>" id="ftphost_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['ftphost']); ?>" />
      <input type="hidden" name="ftpuser_<?php echo $cnt1; ?>" id="ftpuser_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['ftpuser']); ?>" />
      <input type="hidden" name="ftppassword_<?php echo $cnt1; ?>" id="ftppassword_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['ftppassword']); ?>" />
      <input type="hidden" name="passivemode_<?php echo $cnt1; ?>" id="passivemode_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['passivemode']); ?>" />
      <input type="hidden" name="rootdirectory_<?php echo $cnt1; ?>" id="rootdirectory_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['rootdirectory']); ?>" />
      <input type="hidden" name="startingdirectory_<?php echo $cnt1; ?>" id="startingdirectory_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['startingdirectory']); ?>" />
      <input type="hidden" name="fullurl_<?php echo $cnt1; ?>" id="fullurl_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['fullurl']); ?>" />
      <input type="hidden" name="imagedirectory_<?php echo $cnt1; ?>" id="imagedirectory_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['imagedirectory']); ?>" />
      <input type="hidden" name="flashdirectory_<?php echo $cnt1; ?>" id="flashdirectory_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['flashdirectory']); ?>" />
      <input type="hidden" name="hiddendirectories_<?php echo $cnt1; ?>" id="hiddendirectories_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['hiddendirectories']); ?>" />
      <input type="hidden" name="maxfilesize_<?php echo $cnt1; ?>" id="maxfilesize_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['maxfilesize']); ?>" />
      <input type="hidden" name="maximagesize_<?php echo $cnt1; ?>" id="maximagesize_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['maximagesize']); ?>" />
      <input type="hidden" name="maximagewidth_<?php echo $cnt1; ?>" id="maximagewidth_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['maximagewidth']); ?>" />
      <input type="hidden" name="maximageheight_<?php echo $cnt1; ?>" id="maximageheight_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['maximageheight']); ?>" />
      <input type="hidden" name="sitebuilderpages_<?php echo $cnt1; ?>" id="sitebuilderpages_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['sitebuilderpages']); ?>" />
      <input type="hidden" name="editablefiletypes_<?php echo $cnt1; ?>" id="editablefiletypes_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['editablefiletypes']); ?>" />
      <input type="hidden" name="noneditablefiletypes_<?php echo $cnt1; ?>" id="noneditablefiletypes_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['noneditablefiletypes']); ?>" />
      <input type="hidden" name="linkfiletypes_<?php echo $cnt1; ?>" id="linkfiletypes_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['linkfiletypes']); ?>" />
      <input type="hidden" name="imagefiletypes_<?php echo $cnt1; ?>" id="imagefiletypes_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['imagefiletypes']); ?>" />
      <input type="hidden" name="spellchecklanguage_<?php echo $cnt1; ?>" id="spellchecklanguage_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['spellchecklanguage']); ?>" />
      <input type="hidden" name="singlelinereturn_<?php echo $cnt1; ?>" id="singlelinereturn_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['singlelinereturn']); ?>" />
      <input type="hidden" name="tablebordersonbydefault_<?php echo $cnt1; ?>" id="tablebordersonbydefault_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['tablebordersonbydefault']); ?>" />
      <input type="hidden" name="restrictedediting_<?php echo $cnt1; ?>" id="restrictedediting_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['restrictedediting']); ?>" />
      <input type="hidden" name="outputxhtml_<?php echo $cnt1; ?>" id="outputxhtml_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['outputxhtml']); ?>" />
      <input type="hidden" name="displayImageThumbs_<?php echo $cnt1; ?>" id="displayImageThumbs_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['displayImageThumbs']); ?>" />
      <input type="hidden" name="absolutepaths_<?php echo $cnt1; ?>" id="absolutepaths_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['absolutepaths']); ?>" />
      <input type="hidden" name="allowcreate_<?php echo $cnt1; ?>" id="allowcreate_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['allowcreate']); ?>" />
      <input type="hidden" name="allowcreatefolder_<?php echo $cnt1; ?>" id="allowcreatefolder_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['allowcreatefolder']); ?>" />
      <input type="hidden" name="allowcreateimagefolder_<?php echo $cnt1; ?>" id="allowcreateimagefolder_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['allowcreateimagefolder']); ?>" />
      <input type="hidden" name="allowdelete_<?php echo $cnt1; ?>" id="allowdelete_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['allowdelete']); ?>" />
      <input type="hidden" name="allowdeleteimage_<?php echo $cnt1; ?>" id="allowdeleteimage_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['allowdeleteimage']); ?>" />
      <input type="hidden" name="allowrename_<?php echo $cnt1; ?>" id="allowrename_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['allowrename']); ?>" />
      <input type="hidden" name="allowrenameimage_<?php echo $cnt1; ?>" id="allowrenameimage_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['allowrenameimage']); ?>" />
      <input type="hidden" name="allowcopy_<?php echo $cnt1; ?>" id="allowcopy_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['allowcopy']); ?>" />
      <input type="hidden" name="allowcopyimage_<?php echo $cnt1; ?>" id="allowcopyimage_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['allowcopyimage']); ?>" />
      <input type="hidden" name="allowupload_<?php echo $cnt1; ?>" id="allowupload_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['allowupload']); ?>" />
      <input type="hidden" name="allowuploadimage_<?php echo $cnt1; ?>" id="allowuploadimage_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['allowuploadimage']); ?>" />
      <input type="hidden" name="docrootoverride_<?php echo $cnt1; ?>" id="docrootoverride_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['docrootoverride']); ?>" />
      <input type="hidden" name="altscriptname_<?php echo $cnt1; ?>" id="altscriptname_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['altscriptname']); ?>" />
      <input type="hidden" name="alturl_<?php echo $cnt1; ?>" id="alturl_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['alturl']); ?>" />
      <input type="hidden" name="modes_<?php echo $cnt1; ?>" id="modes_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssitebox_users['modes']); ?>" />
      <?php } while ($row_rssitebox_users = mysql_fetch_assoc($rssitebox_users)); ?>
      <div class="KT_bottombuttons"> 
        <div> 
          <?php 
      // Show IF Conditional region1
      if (@$_GET['pk_userid'] == "") {
      ?>
          <input type="submit" name="KT_Insert1" id="KT_Insert1" value="<?php echo NXT_getResource("Insert_FB"); ?>"/>
          <?php 
      // else Conditional region1
      } else { ?>
          <div class="KT_operations"> 
            <input type="submit" name="KT_Insert1" value="<?php echo NXT_getResource("Insert as new_FB"); ?>" onclick="nxt_form_insertasnew(this, 'pk_userid')" />
		  </div>
          <input type="submit" name="KT_Update1" value="<?php echo NXT_getResource("Update_FB"); ?>" />
          <input type="submit" name="KT_Delete1" value="<?php echo NXT_getResource("Delete_FB"); ?>" onclick="return confirm('<?php echo NXT_getResource("Are you sure?"); ?>');" />
          <?php }
      // endif Conditional region1
      ?>
          <input type="button" name="KT_Cancel1" value="<?php echo NXT_getResource("Cancel_FB"); ?>" onclick="return UNI_navigateCancel(event, '../includes/nxt/back.php')" />
        </div>
      </div>
	  
    </form>
  </div>
  <br class="clearfixplain" />
</div>
<p></p>



</body>
</html>

Posted: Tue Jan 31, 2006 2:40 pm
by xtreemgt
There has to be an easier way to do this. It seems like Im over thinking this whole process. Would it be simplier to create a session with the username form field and pass that to another page and create the directory that way? I've been banging my head on this for 2 days 8O

Posted: Tue Jan 31, 2006 9:03 pm
by nickman013
Jcart wrote:if you are interested in the mod rewrite way, have a discussion on the exact same situation

viewtopic.php?t=43500&highlight=

yo, just take a look at that, its what you are looking for, this same question has been asked three times in a week!

Posted: Wed Feb 01, 2006 11:15 am
by xtreemgt
Thats not what I'm trying to do. I need to create an actual folder for each new signup. I can get it to create a folder if I put the code on a page by itself but I cant get it to pull the username from the form and than create the folder when the user submits the form.

Posted: Wed Feb 01, 2006 3:25 pm
by nickman013