Rank: Member
Groups: Member
Joined: 6/21/2006(UTC) Posts: 15
|
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?
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 8/3/2003(UTC) Posts: 998
|
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");
Edited by user Monday, February 25, 2008 5:51:59 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Member
Joined: 6/21/2006(UTC) Posts: 15
|
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");
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
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
|
|
|
|
Rank: Member
Groups: Member
Joined: 6/21/2006(UTC) Posts: 15
|
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%>");
}
Edited by user Monday, February 18, 2008 6:19:46 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Please post the entire code of you page. |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
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. Edited by user Monday, February 18, 2008 6:19:22 PM(UTC)
| Reason: Not specified |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Member
Groups: Member
Joined: 6/15/2006(UTC) Posts: 9
|
thank you very much thats got it working Regards
|
|
|
|
|
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.