Jump to content

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

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.