problems with passing additional POST variables

XUpload related questions

Moderator: admin

Message
Author
little_timmy
Posts: 2
Joined: Nov 27, 2008 9:33 pm

problems with passing additional POST variables

#1 Postby little_timmy » Nov 27, 2008 9:40 pm

hello,
I am using XUpload successfully, except I can't pass additional form variables through upload.cgi for use in further php processing...
I saw your reply to rayfresh in the 'How to use values from the upload form in the upload.cgi ?' post, where you explain how to add extra code to upload.cgi, e.g.

in upload.cgi find:
$fn = substr($fn,0,$c->{max_name_length});

and add line below:
Code:
$fn = $cg->param('code');

when I try this, I can retrieve EITHER the standard variables such as $_POST['file_name'][n]
OR the additional variables I have added using your method,
but not both...

that is to say, if I add the lines
$fn = $cg->param('id');
$fn = $cg->param('tbl');
$fn = $cg->param('key');
I can retrieve values for $_POST['id'], $_POST['tbl'] and $_POST['key']
but $_POST['file_name][0] has been mysteriously emptied...
if I don't add lines, then I am able to retrieve $_POST['file_name'][0] etc with not problem...

any help you can offer will be greatly appreciated

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#2 Postby PilgrimX182 » Nov 28, 2008 11:29 am

Just create hidden inputs in upload form - they will be automatically POSTed to post php script.

little_timmy
Posts: 2
Joined: Nov 27, 2008 9:33 pm

#3 Postby little_timmy » Nov 28, 2008 11:45 am

I have done this (and not added the extra lines to upload.cgi) and it seems to work, but unreliably... sometimes the post values are dropped, sometimes not...

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#4 Postby PilgrimX182 » Dec 01, 2008 9:42 am

"unreliably"? No such word in programming. Should work 100%.
Figure out when it works and when it's not.


Return to “XUpload”

Who is online

Users browsing this forum: No registered users and 0 guests