shank888 Posted April 21, 2008 Share Posted April 21, 2008 For sumreason it refuses to do wha ti want it to do and that is create a new directory in the subdomain. <?php ini_set ('display_errors', 1); error_reporting (E_ALL & ~E_NOTICE); if (isset ($_POST['submit'])) { $problem = FALSE; // no problems so far if (empty ($_POST['username'])) { $problem = TRUE; print "<p>Please enter a username.</p>"; } if (empty ($_POST['password'])) { $problem = TRUE; print "<p>Please enter a password</p>"; } if ($_POST['password'] != $_POST['cpassword']) { $problem = TRUE; print "<p>Your Passwords did not match.</p>"; } if (!problem) { // If no problems occured mkdir("../users.domain.com/$username"); // this should create a new folder for the user in the users.babble-net.com subdomain //print register message print "<p>You have now been registered!</p>"; } else { print "<p>You could not be registed due to an internal system error.</p>"; } } // Displaying HTML form below print " <form action='register.php' method='post'> Username: <input type='text' name='username' size='20' /> <br /> Password: <input type='password' name='password' size='20' /> <br /> Confirm Password: <input type='password' name='cpassword' size='20' /> <br /> <input type='submit' name='submit' value='register' /> </form> "; ?> Quote Link to comment https://forums.phpfreaks.com/topic/102202-solved-creating-a-directory/ Share on other sites More sharing options...
DarkWater Posted April 21, 2008 Share Posted April 21, 2008 First thing that comes to mind is incorrect permissions. And dude, you don't want a separate directory for each user. Use mod_rewrite to make it seem like each user has his/her own directory. =) Quote Link to comment https://forums.phpfreaks.com/topic/102202-solved-creating-a-directory/#findComment-523163 Share on other sites More sharing options...
shank888 Posted April 21, 2008 Author Share Posted April 21, 2008 hmm where can i get mor einfo on mod_rewrite? Quote Link to comment https://forums.phpfreaks.com/topic/102202-solved-creating-a-directory/#findComment-523171 Share on other sites More sharing options...
DarkWater Posted April 21, 2008 Share Posted April 21, 2008 hmm where can i get mor einfo on mod_rewrite? Mod_rewrite is an Apache module, and Google is your friend. Quote Link to comment https://forums.phpfreaks.com/topic/102202-solved-creating-a-directory/#findComment-523174 Share on other sites More sharing options...
shank888 Posted April 21, 2008 Author Share Posted April 21, 2008 okay I will be looking more into this, seems like its a .htacess kinda thing which i need to learn. anyways can be marked as solved i guess or just deleted Quote Link to comment https://forums.phpfreaks.com/topic/102202-solved-creating-a-directory/#findComment-523191 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.