Jump to content

[SOLVED] Create Folder


Solar

Recommended Posts

How would I create a subfolder with there name using this code?

 

}

/**

* The user has submitted the registration form and the

* results have been processed.

*/

else if(isset($_SESSION['regsuccess'])){

  /* Registration was successful */

  if($_SESSION['regsuccess']){

      echo "<h1>Registered!</h1>";

      echo "<p>Thank you <b>".$_SESSION['reguname']."</b>, for registering on PasteIt! "

          ."you may now create your own website! <a href=\"index.php\">log in</a>.</p>";

  }

 

 

So by using ".$_SESSION['reguname']." Make a subfolder name with that. :) What would the script look like and where can I place it in this script?

Oh and inserting a simple like php page as well. That would be similar right?

Link to comment
https://forums.phpfreaks.com/topic/147604-solved-create-folder/
Share on other sites

<?php }
/**
* The user has submitted the registration form and the
* results have been processed.
*/
else if(isset($_SESSION['regsuccess'])){
   /* Registration was successful */
   if($_SESSION['regsuccess']){
      echo "<h1>Registered!</h1>";
      echo "<p>Thank you <b>".$_SESSION['reguname']."</b>, for registering on PasteIt! "
          ."you may now create your own website! <a href=\"index.php\">log in</a>.</p>";
   } ?>

 

I'm having trouble inserting;

<?php
mkdir("".$_SESSION['reguname']."/", 0700);
?> 

Into the coding. I've inserted it above the "Thank You" and I get a line of error;

Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\pasteit\register.php on line 37

 

Hmmm, is it because of where I am placing it? :/

Link to comment
https://forums.phpfreaks.com/topic/147604-solved-create-folder/#findComment-774894
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.