Hey there,
i read myself through the many threads about file uploading but could not find a solution. Its a bit urgent because i need file uploading working at the end of the week...
My Problem is as follows:
1. form definition looks like this:
<form name="regform" action="<?=$_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data">
2. clicking upload works, a var_dump($_FILES); gives me the uploaded files and the temp_names and so on.
3. Im passing the file array to the ft_api_process_form :
$params = array(
"submit_button" => "weiter",
"next_page" => "confirm.php",
"form_data" => $_POST,
"file_data" => $_FILES
);
ft_api_process_form($params);
4. On the confirmation page, there is nothing in $fields['upload1'];
(I also tried $fields['upload1']['name']; )
The files are not stored in the upload directory!
I cannot verify uploads via the Admin panel because i couldn't upload files in my test submission and therefore the inputs are not recognized!
I however tested file upload with a simple file upload script unrelated to formtools.
Questions:
q1) The files are not renamed from temporary to desired name, do i still have to use a script like the one mentioned here: http://forums.formtools.org/showthread.php?tid=126 ?
q2) Does ft_api_process_form() store the file values in the fields array too? E.g. is $fields['upload1']; valid if the file input was named upload1 ? Or do i have to use $fields['upload1']['name']; ?
Thanks in advance for replies!
i read myself through the many threads about file uploading but could not find a solution. Its a bit urgent because i need file uploading working at the end of the week...
My Problem is as follows:
1. form definition looks like this:
<form name="regform" action="<?=$_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data">
2. clicking upload works, a var_dump($_FILES); gives me the uploaded files and the temp_names and so on.
3. Im passing the file array to the ft_api_process_form :
$params = array(
"submit_button" => "weiter",
"next_page" => "confirm.php",
"form_data" => $_POST,
"file_data" => $_FILES
);
ft_api_process_form($params);
4. On the confirmation page, there is nothing in $fields['upload1'];
(I also tried $fields['upload1']['name']; )
The files are not stored in the upload directory!
I cannot verify uploads via the Admin panel because i couldn't upload files in my test submission and therefore the inputs are not recognized!
I however tested file upload with a simple file upload script unrelated to formtools.
Questions:
q1) The files are not renamed from temporary to desired name, do i still have to use a script like the one mentioned here: http://forums.formtools.org/showthread.php?tid=126 ?
q2) Does ft_api_process_form() store the file values in the fields array too? E.g. is $fields['upload1']; valid if the file input was named upload1 ? Or do i have to use $fields['upload1']['name']; ?
Thanks in advance for replies!