Welcome Guest Search | Active Topics | Members

Sending extra PHP variables to upload.php Options
Hacim
Posted: Monday, July 17, 2006 8:51:22 PM
Rank: Member
Groups: Member

Joined: 6/21/2006
Posts: 15
Points: 0
Hello,

I am having trouble sending php variables to upload.php. Is there a sample script for sending a php variable in the index.php to the upload.php without using a html form?

Alex Makhov
Posted: Tuesday, July 18, 2006 12:40:57 AM

Rank: Advanced Member
Groups: Member

Joined: 8/3/2003
Posts: 996
Points: 1
Hello,

There are three ways to send your data to the upload processing script in your case:

1) Add invisible field to the form
2) Use AddField method
3) Change the Action property value to something like this:
Code:
iu.addParam("Action", "upload.php?data1=value1&data2=value2");


Sincerely yours,
Alex Makhov
Hacim
Posted: Tuesday, July 18, 2006 1:00:54 AM
Rank: Member
Groups: Member

Joined: 6/21/2006
Posts: 15
Points: 0
Hello and thank you for the reply,

i am using the following as suggested and and still having trouble reading the php variable. Do you have any php scripts on this?

iu.addParam("Action", "upload.php?data1=$newlastrow");
Fedor
Posted: Tuesday, July 18, 2006 3:28:10 AM

Rank: Advanced Member
Groups: Administration , Member

Joined: 7/28/2003
Posts: 1,254
Points: -345
Location: WA, US
Quote:
iu.addParam("Action", "upload.php?data1=$newlastrow");


Hmm,

I think you should use:

Code:
iu.addParam("Action", "upload.php?data1=");


Also you should use addParam methods only during control initialization. At runtime, you should setAction method:

Code:
getImageUploader("ImageUploaderID").setAction("upload.php?data1=");



Best regards,
Fedor Skvortsov
Hacim
Posted: Tuesday, July 18, 2006 4:25:20 AM
Rank: Member
Groups: Member

Joined: 6/21/2006
Posts: 15
Points: 0
Still not working.

Ive added the following:

Code:
iu.addParam ("Action", "upload.php?data1=<% echo $newlastrow%>");

function fullPageupload()
{
imageUploader1=getImageUploader("ImageUploader1").setAction(upload.php?data1=<% echo $newlastrow%>");
}


Fedor
Posted: Tuesday, July 18, 2006 6:51:26 AM

Rank: Advanced Member
Groups: Administration , Member

Joined: 7/28/2003
Posts: 1,254
Points: -345
Location: WA, US
Please post the entire code of you page.

Best regards,
Fedor Skvortsov
Fedor
Posted: Tuesday, July 18, 2006 7:59:34 AM

Rank: Advanced Member
Groups: Administration , Member

Joined: 7/28/2003
Posts: 1,254
Points: -345
Location: WA, US
I am sorry, I am ASP guy mostly, that why I have posted the code using <% %> instead of <?php ?>.

Please use this code:

Code:
iu.addParam("Action", "upload.php?data1=<?php echo $newlastrow?>");


Also please note that in the code you have sent me in private communication there are 2 calls of iu.addParam("Action", ...) method. Now that first call will be just ignored.

Best regards,
Fedor Skvortsov
MOZ
Posted: Tuesday, July 18, 2006 8:28:38 AM
Rank: Member
Groups: Member

Joined: 6/16/2006
Posts: 8
Points: 3
thank you very much thats got it working
Regards


MMOZ
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.