Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1098587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:36:00+00:00 2026-05-17T00:36:00+00:00

I’m a javascript guy getting too deep into php (even though this question is

  • 0

I’m a javascript guy getting too deep into php (even though this question is not deep).

I am passing two different variables in the url from file to file. One goes across fine while the other does not.

I have 2 files. upload.php and uploadfiles.php.

The params help construct the destination to which the files are uploaded.

The two params are “memberId” and “fileType”.

Here is where I pass the params to uploadfiles.php, this code is on upload.php.

Its in two places. One for a hidden input for a form and another passed as a var to a flash script.

On form:

<input name="uploadscript" id="uploadscript" type="hidden" value="/flashuploader/FileProcessingScripts/PHP/uploadfiles.php?memberId=<?php echo $_REQUEST["memberId"] ?>&fileType=<?php echo $_REQUEST["fileType"] ?>" />

In the js:

uploadUrl: '/flashuploader/FileProcessingScripts/PHP/uploadfiles.php?memberId=<?php echo $_REQUEST["memberId"] ?>&fileType=<?php echo $_REQUEST["fileType"] ?>'

I have tested on upload.php that $_REQUEST[“fileType”] does indeed have the correct value.

And then I retrieve the params on uploadfiles.php like so:

$uploaddir=realpath(dirname(__FILE__) . '/../../../memberimages/') . '/'.$_REQUEST["memberId"].'/My_Files/'.$_REQUEST["fileType"].'/';

Param “memberId” works fine, but “fileType” is empty. I’m sure it has to do with the way that I am adding the params to the url with php on upload.php but I’m out of ideas.

Here is the html produced and returned by upload.php. You can see the values look correct on lines 44 and 80:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<script type="text/javascript">

   function mysubmit(type)
   {
      if(document.getElementById("uploadscript").value=='')
      {
         window.alert('Enter upload processing script file name!');
         return false;
      }
      if(type=='flash')
      {        
         MultiPowUpload.uploadAll(document.getElementById("uploadscript").value); 
         document.getElementById("server_reply").value="";
      }
      else
      {
         var FormObj = document.getElementById("myform");
         FormObj.action = document.getElementById("uploadscript").value;
         return true;
      }
   }

   function MultiPowUpload_onComplete(type, index, serverResponse)
   {  
      var reply;
      reply = document.getElementById("server_reply");
      reply.value += "\nReply for file: " + MultiPowUpload.fileList()[index].name + "\r\n" + serverResponse + "\n";
   }
   var fileType = 'Video';
   function MultiPowUpload_onCompleteAbsolute(type, uploadedBytes)
   {
      if (fileType == 'Video'){
           parent.loadUserVideos();
      } else if (fileType == 'Images') {
           parent.loadUserImages();
      }
   }

  </script>

<div style="margin-top: -20px">
<input name="uploadscript" id="uploadscript" type="hidden" value="/flashuploader/FileProcessingScripts/PHP/uploadfiles.php?memberId=43&fileType=Video" />
<table width="380" cellpadding="0" cellspacing="0">
   <tr>
      <td style="position: relative;">
      <div id="MultiPowUpload_holder" style="margin-top: 20px">
      <table width="380" cellpadding="0" cellspacing="0">
         <tr>
            <td>
            <form id="myform" onSubmit="return mysubmit();"
               enctype="multipart/form-data" action="" method="POST">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
               <tr>
                  <td width="106"><span
                     style="font-family: Arial, Helvetica, sans-serif; font-size: 12px">Select
                  file:</span></td>
                  <td width="294"><input name="Filedata" type="file" /></td>
               </tr>
            </table>
            <br>
            <input type="submit" value="Upload File" /></form>
            </td>
         </tr>
      </table>
      </div>
      <!-- <img src="/images/ajax-loader.gif" style="position:absolute; top:40%; left:50%; margin-left:-110px;" /> -->
      <!-- SWFObject home page: http://code.google.com/p/swfobject/ --> <script
         type="text/javascript" src="/flashuploader/swfobject.js"></script> <script
         type="text/javascript">
         var params = {
            BGColor: "#FFFFFF"
         };
         var attributes = {
            id: "MultiPowUpload",
            name: "MultiPowUpload"
         };
         var flashvars = {
           uploadUrl: '/flashuploader/FileProcessingScripts/PHP/uploadfiles.php?memberId=43&fileType=Video',
           uploadButtonVisible: "Yes",
           useExternalInterface: "Yes",
           maxFileSize: "6024000",
           maxFileCount: "20",
           maxFileSizeTotal: "20480000",
           backgroundColor: "#FFFFFF",
           buttonTextColor: "#000000",
           buttonBackgroundColor: "#F1F1F1",
           buttonBottomBorderColor: "#E1E1E1",
           buttonTopBorderColor: "#E1E1E1",
           buttonDisabledBackgroundColor: "#FFFFFF",
           buttonDisabledBottomBorderColor: "#DDDDDD",
           buttonDisabledTopBorderColor: "#DDDDDD",
           buttonDisabledTextColor: "#DDDDDD", 
           buttonRollOverBottomBorderColor: "#666666",
           buttonRollOverTopBorderColor: "#666666",
           buttonDownBottomBorderColor: "#000000",
           buttonDownTopBorderColor: "#000000",
           buttonDownBottomBackgroundColor: "#FFFFFF",
           buttonDownTopBackgroundColor: "#FFFFFF",
           listTextSelectedColor: "#000000",
           listTextRollOverColor: "#333333",
           listRollOverColor: "#DDDDDD",
           listDownColor: "#EEEEEE",
           listSelectedUpColor: "#EEEEEE",
           listSelectedRollOverColor: "#D2D2D2",
           listUnuploadedColor: "#777777",
           listUploadedColor: "#FFFFFF",
           progressBarLeftColor: "#BBBBBB",
           progressBarRightColor: "#AAAAAA",
           progressBarLeftBorderColor: "#E1E1E1",
           progressBarRightBorderColor: "#E1E1E1",
           textColor: "#FFFFFF"
         };
         swfobject.embedSWF("/flashuploader/ElementITMultiPowUpload2.1.swf", "MultiPowUpload_holder", "380", "270", "9.0.0", "/flashuploader/expressInstall.swf", flashvars, params, attributes);

     </script></td>
   </tr>
</table>
</div>
</body>

Thanks for the help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:36:00+00:00Added an answer on May 17, 2026 at 12:36 am

    I solved this by making the URL into just one parameter. I pass it along (after verifying that it is only strings and acceptable data) as one param to uploadfiles.php. For some reason the php didn’t like more than one param.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I used javascript for loading a picture on my website depending on which small
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.