Not sure if anyone can offer any advice to this..
The script was working until I started integrating phpbb request variables.
Basically I have a simple form which takes some files..
The snippet from the php script..
But it does not return my filenames..
I should also note the phpbb session seems to be working because I can obtain the username from the user logged into the forum with echo $user->data['username_clean'];
Before phpbb integration it was working fine and I got the filenames. Now it seems to "forget" what was POSTed..
I've been looking around the Internet all morning and I cannot see what I am doing wrong here ?
I have tried passing a variable and that seems to work fine..
I can only assume it's because I am trying to upload files to my server and phpbb doesn't like me doing that. I took out all the phpbb stuff and files upload fine. So what I am trying to do, I assume simply can't work.
The script was working until I started integrating phpbb request variables.
Basically I have a simple form which takes some files..
Code:
<form action="upload_util.php" method="POST" enctype="multipart/form-data"> <div align="center"> <input type="file" name="files[]" multiple> <button type="submit" name="submit">Upload</button> </div></form>
Code:
if ($request->is_set_post('submit')) { // Retrieve uploaded files using the request class $files = $request->file('files'); // Debug: print the $files array echo '<pre>'; print_r($files); echo '</pre>';
Code:
Array( [name] => none [type] => none [tmp_name] => none [error] => none [size] => none)Exactly
Before phpbb integration it was working fine and I got the filenames. Now it seems to "forget" what was POSTed..
I've been looking around the Internet all morning and I cannot see what I am doing wrong here ?
I have tried passing a variable and that seems to work fine..
Code:
// Retrieve the submitted variable using the request class $myVariable = $request->variable('myVariable', '');
Code:
<input type="hidden" name="myVariable" value="example_value">
Statistics: Posted by exxos — Mon Jul 01, 2024 12:44 pm