XUpload - Sending comment variable

Message
Author
deejan
Posts: 3
Joined: Jan 17, 2008 8:55 pm

Sending comment variable

#1 Postby deejan » Jan 17, 2008 9:05 pm

Hi,
firstly, sorry my english, im from germany and my english skills aren't very well.

I'm a pleased user of your Xupload script and i've modified it already a bit, to fit for my use. I don't have any CGI knowledge, but was able to modify the upload.cgi, so it wont post any variable to the post.cgi excepting the filename. I've inserted a form to the post.cgi which automatically post the filename to a php file where mysql inserts the filename into a database.

Now i'm trying to insert a comment field on the upload form, but i don't know how to handle with the upload.cgi, so it posts the comment to post.cgi in an own variable.
I become insane :cry: .

I hope you can help me.

With kind regards,
Deejan.

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#2 Postby PilgrimX182 » Jan 18, 2008 10:01 am

I'm not clear - do you want to send comment to post.cgi or want to avoid this?

The code below this line responsible to sending variables from your form:

Code: Select all

for my $k ($cg->param).....
So if you want to avoid sending comment to post.cgi just add 'comment' or whatever you called comment field to this list delimited with | :

Code: Select all

next if $k =~ /(xmode|xpass|pbmode|ref|js_on|upload_id|css_name|tmpl_name|inline|upload_password|popup|file_\d)/i;

deejan
Posts: 3
Joined: Jan 17, 2008 8:55 pm

#3 Postby deejan » Jan 18, 2008 10:43 am

Thanks for your answer. :)

I don't want to avoid sending comment, to the contrary i've added a comment field to the upload form with name="descript". I want the upload.cgi, where all data get sended to, to post "descript" to the post.cgi, but in an own varible.

I need to know how to tell the upload.cgi to take the data of the field "descript" in an variable, and send it to the post.cgi. And, how the post.cgi can take the variable again, in an variable.

If you have time we can talk via MSN or ICQ.

Thanks again.

With kind regards,
Deejan.

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#4 Postby PilgrimX182 » Jan 18, 2008 1:36 pm

Well...I'm not sured what modifications have u made, but

Code: Select all

push @har, { name=>'descript', value=>$cg->param('descript') };
will do the trick.

You can contact me in ICQ. It's specified in my profile.

deejan
Posts: 3
Joined: Jan 17, 2008 8:55 pm

#5 Postby deejan » Jan 20, 2008 10:42 pm

Thank you for the nice Support via ICQ. This means Service :) .