PDA

View Full Version : Creating folders AFTER registration


derekbeau
11-02-2005, 07:45 AM
I modified register.php in vb 3.03 so that when a user completes registration, the script creates a folder for them on the server. The code I used is...


$dir_username = addslashes(htmlspecialchars_uni($_POST['username']));
mkdir ("../images/members/$dir_username", 0777);
chmod ("../images/members/$dir_username", 0777);


I need to know where I can insert this code and how I can retrieve the user ID. I will be using the Userid from now on instead of the username.

Thanks

derekbeau
11-05-2005, 01:17 AM
Maybe if I rephrase it will help...

Where in register.php (or another file) does a new user get inserted into the database?

I would like to execute that code above, right after the user has been entered in the database.