Jump to content

Recommended Posts

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>
";


?>

Link to comment
https://forums.phpfreaks.com/topic/102202-solved-creating-a-directory/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.