Re: Re: How to store Images by memeber name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just a note on this code...

You could shorten the top listed portion by a few lines -- there's no need
for the ELSE if it's a condition that always happens. Semi off-topic, but
I tend towards efficiency in code wherever possible.
--
Joe

if (!file_exist($user_name)) {
  mkdir($user_name);
}
image_upload();


> Hi Aravind,
>
> However you have kept the user_name or user_id in session and also
> user_name is a unique. So you can create your folder named user_name.
>
> if (!file_exist($user_name)) {
>     mkdir($user_name);
>     image_upload();
> }
> else {
>     image_upload();
> }
>
> function image_upload() {
> // add the image upload codehere
> }
>
>
>  Thanks & Regards
> Udayakumar Sarangapani
> Sr. PHP Developer
> CompIndia Infotech Pvt. Ltd.
> Chennai.
>
> "Science is nothing but logic..."


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux