2 Replies - 496 Views - Last Post: 12 June 2010 - 10:27 AM

#1 Guest_Kyle*


Reputation:

Uploading files to form value directory

Posted 09 June 2010 - 04:42 PM

"kyle.php file"
  <form action="./kyleuploadgroup.php" method="post" enctype="multipart/form-data"name"flieuploader">
                                  
                                    <font color="#000000">            </font>
                                    <p><label for="file"><font color="#000000">Select a file to upload into the group folder:</font></label>                           <font color="#000000"> <br />
                                    <input type="file" name="userfile" id="file" />
                                    Kyle:<input type="radio" name="pathchooser" id="pathchooser" value="./kyle/">
                                    <label></label>
                                    Group:<input type="radio" name="pathchooser" id="pathchooser" value"./group/">
                                    <br />
                                    <button>Upload File</button></font></p>
                                </form>



The "kyleuploadgroup.php" file
    $upload_path = '$_POST["pathchooser"];'; 



No known knowledge of forms and php--(Yet)

Thanks

Is This A Good Question/Topic? 0

Replies To: Uploading files to form value directory

#2 singularity  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 17
  • View blog
  • Posts: 184
  • Joined: 17-October 08

Re: Uploading files to form value directory

Posted 11 June 2010 - 07:31 AM

So, what is the issue, You have pasted your code but are not clear as to what do you want to do with it and where are you getting stuck.
Was This Post Helpful? 0
  • +
  • -

#3 Guest_kyle*


Reputation:

Re: Uploading files to form value directory

Posted 12 June 2010 - 10:27 AM

i am having difficulty making the radio buttons influence the path in the php script.
 Kyle:<input type="radio" name="pathchooser" id="pathchooser" value="./kyle/">
                                    <label></label>
                                    Group:<input type="radio" name="pathchooser" id="pathchooser" value"./group/"> 

Having the selected radio value be put in the php code
 $upload_path = '$_POST["pathchooser"];';


i get invalid directory
However, when i manually type the path in without using radio buttons, it works perfectly.

The downside to that is i'll have to use 2 different file uploaders on the webpage each with a diffect path. EX)
 $upload_path = './group/'; 

Was This Post Helpful? 0

Page 1 of 1