am having a lot of headache trying to pass values to upload.php
I have tried various ways to pass one parameter but it is always empty in upload.php.
I have seen the sample but I failed to get it right nor all the other tutorials outthere helped me out.
here is the code i am using -
$(document).ready(function() {
-
$("#UploadImages").fileUpload({
-
'uploader': '/erivoices/fbox/uploader.swf',
-
'cancelImg': '/erivoices/fbox/cancel.png',
-
'script': '/erivoices/fbox/upload.php',
-
'folder': '1502',
-
'multi': true,
-
'buttonText': 'Add Photos',
-
'checkScript': '/erivoices/fbox/check.php',
-
'displayData': 'percentage',
-
'scriptData': {'serah':1502},
-
'fileExt': '*.jpg;*.jpeg;*.gif;*.png',
-
'simUploadLimit': 2,
-
-
-
onError: function (a, b, c, d) {
-
if (d.status == 404)
-
alert('Could not find upload script. Use a path relative to: '+'<?= getcwd() ?>');
-
else if (d.type === "HTTP")
-
alert('error '+d.type+": "+d.status);
-
else if (d.type ==="File Size")
-
alert(c.name+' '+d.type+' Limit: '+Math.round(d.sizeLimit/1024)+'KB');
-
else
-
alert('error '+d.type+": "+d.text);
-
},
-
});
-
});
-
-
-
function startUpload(id){
-
-
$('#UploadImages').fileUploadSettings('scriptData',"serah="+id);
-
//alert('&name='+$('#name3').val()+'&location='+$("#location").val());
-
$('#UploadImages').fileUploadStart();
-
}
-
-
And in the body section, I am trying both: -
<div id="UploadImages">Photo Uploader Error</div>
-
<a href="javascript:startUpload(1502)">Start Upload</a>
-
<a href="javascript:$('#UploadImages').fileUploadStart()">Start Upload</a> | <a href="javascript:$('#UploadImages').fileUploadClearQueue()">Clear Queue</a></p>
-
</div>
-
I am having to Start Upload commands because I want to try them both but both failed. By the way, even the following variable don't go to upload.php
and upload.php is -
<?php
-
require('../konfig.php');
-
// JQuery File Upload Plugin v1.4.1 by RonnieSan - (C)2009 Ronnie Garcia
-
//I want to upload the files to folder 1502 which I must get from GET or POST as it varies from call to call.
-
if (!empty($_FILES)) {
-
require(DB);
-
$workingon=mysql_real_escape_string($_POST[serah]);
-
$tempFile = $_FILES['Filedata']['tmp_name'];
-
-
$targetPath = GROUPPICTURES.$workingon."/";
-
//WHERE GROUPPICTURES is a constant defined in konfig.php
-
-
$targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
-
-
// Uncomment the following line if you want to make the directory if it doesn't exist
-
// mkdir(str_replace('//','/',$targetPath), 0755, true);
-
-
move_uploaded_file($tempFile,$targetFile);
-
-
-
}
-
-
echo '1';
-
-
?>
-
3 4056
First check that upload.php is working correctly. Echo out the POSTed variable values.
Next, try out a working example from the uploadify samples following the examples exactly as coded. When you have that working, you can then adapt to your requirements.
hi,
i took the code from the samples in uploadfy. They would work if i want to place the images/files in the same directory as the whole uploadify files, just like in the samples. And upload.php is not accepting the POSTed variables which is the root of the problem. I think the variables are not been posted to it but I don't know why.
'method' : 'GET',
'scriptData': {'serah':1502},
add method parameter with 'GET' in the option. The default method type is 'POST'. I test it, it can pass scriptData to server.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Chuck Amadi |
last post by:
A little help has anyone used the email-dir.py Email Module ,I have downloaded
the example and would like some pointers to get it going .
For example Have I got to add any parameters to python...
|
by: Ringo Langly |
last post by:
Hi all,
We've been using eWebEditPro for a number of years now, and though it
works fine for our needs - which are simply HTML editing (no XML, CSS,
etc), it's cumbersome to install/setup and...
|
by: Dave R |
last post by:
Hi all,
Has anyone used UploadData API successfully?
The first parameter to the API is the URI where one needs to upload data.
If I give a Fully qualified name i.e.http://myserver.mydomain:XX it...
|
by: Brian Basquille |
last post by:
Hello all.
Quick question for anyone that has used RawMouse / RawInputMouse (and for
anyone that hasn't used it.. look here:
http://link.mywwwserver.com/~jstookey/arcade/rawmouse/).
RawMouse...
|
by: Jens Jensen |
last post by:
High,
There seem to be a financial class accessible from .Net 2.0 .
Has anyone used this? Any sample codes/experience using it?
Thanks
JJ
|
by: Groove |
last post by:
On 10/17, I asked about this in here but never received any responses so I
thought I'd try again. I'm looking at AspDotNetStorefront to power my web
store - particularly the Pro version ($599). ...
|
by: bolina |
last post by:
Has anyone used certmagic.com for CISSP Certified Information Systems
Security Professional to study for the CISSP exam?
|
by: Sasha |
last post by:
Has anyone used dtSearch .Net Engine? What was your experience? Would
you recommend it others?
I am deciding on a .net search engine and would like to hear your
opinion.
Thank you,
Sasha
|
by: simonruk1 |
last post by:
Just a quick one has anyone used os commerce and how easy is it to install on a sever.
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |