tags:

views:

48

answers:

1

hi, i have got a class which is used to upload a file checking its size etc, now i want that the path that i give to save the uploaded file should be dynamic like for example:if i am uploading some documents to leads in crm project than the path should be set in such a way that what ever i upload there should go to that leads folder.and so on for other folder depending upon where i am uploading is this possible. currently m assigning a static path from my html form

A: 

HTML part

<input type="hidden" name="filetype" value="crm">

PHP part

if($_POST['filetype'] === "crm") $path="crm";

You can use that technique not only for the file manipulations but for SQL, draw a graphics, display stock exchange etc.
It is called "programming".

Col. Shrapnel
how will it get to CRM folder, how does it trace the path?
mayuri
@mayuri notice `$path="crm";` part. you can put here any path you desire instead of `crm` one. Btw, do you have any programming/PHP experience? At least to read code snippets?
Col. Shrapnel
i got it working...i already stated i am new to php
mayuri
@mayuri I havent seen where you stated it. Anyway I don't accuse you. Just asking to see what level of assistance you need.
Col. Shrapnel
oh am really sorry..i have been working from past 3 months
mayuri