basic string problem trying to get around it

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cdparmeter
Forum Newbie
Posts: 4
Joined: Fri Apr 17, 2009 12:51 pm

basic string problem trying to get around it

Post by cdparmeter »

so I'm trying to make a directory according to a value captured from a form. here is my original code:

$myfolder="/Members/$lname/gen1";
$mkdir($myfolder);

where $lname is the value from the form. it says function name must be a string on the line of the $mkdir function is called what am i doing wrong can I do this?
User avatar
php_east
Forum Contributor
Posts: 453
Joined: Sun Feb 22, 2009 1:31 pm
Location: Far Far East.

Re: basic string problem trying to get around it

Post by php_east »

mkdir, not $mkdir.

also,

Code: Select all

$myfolder="/Members/".$lname."/gen1";
mkdir($myfolder);
 
cdparmeter
Forum Newbie
Posts: 4
Joined: Fri Apr 17, 2009 12:51 pm

Re: basic string problem trying to get around it

Post by cdparmeter »

stupid mistake, thanks but it's not working now it says

"Warning: mkdir() [function.mkdir]: No such file or directory in C:\xampp\htdocs\myfamilybiography\newmember.php on line 68"

doesn't mkdir() make the path declared?
Post Reply