11-18-2007, 06:42 PM
I've recently built an upload script and got it all working but there is one problem.
Whenever a user submits a file upload the uploader completes the upload and immediately redirects the user to an address that doesn't exist on my site.
www.gamezftw.com/*USERSFILE.EXT* is the address but userfile.ext is replaced with the file name and extension of the users submitted file.
Does any one know who to stop my uploader from redirecting?
11-18-2007, 07:10 PM
Ummm. The only way to be able to know what your code is and to be able to find and fix the problem would be if you were to post your code.
11-18-2007, 07:21 PM
Here you go.
case 'podz': //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PODZ
$new_name = $_POST['name'];
$files = array( '.mp3', '.wav', '.MP3', '.WAV');
if($_SESSION['permix']['a_podz'] == 1)
if (isset($_GET['sub']) && $_GET['sub'] == 'upload' and !isset($_POST['pid']))
// Uploading/Resizing Script
$ext = explode('.', basename($_FILES['pod_file']['name'])); // Get The File Extention In The Format Of , For Instance, .jpg, .gif or .php
$file_ext = '.'.$ext;
$url1 = $new_name.$file_ext; // Set $url To Equal The Filename For Later Use
if(in_array($file_ext, $files) && is_uploaded_file($_FILES['pod_file']['tmp_name']))
move_uploaded_file($_FILES['pod_file']['tmp_name'], $pdir . $url1);
$links = "$pdir" . $new_name.$file_ext;
$size = $_FILES['pod_file']['size'];
print '<font color="#FF0000">ERROR: Wrong filetype (has to be a .wav or .mp3. Yours is '; // Error Message If Filetype Is Wrong
print $file_ext; // Show The Invalid File's Extention
define('PAGE_TITLE', 'ACP - Podcasts');
define('BODY_FORM','width="1000" cellpadding="0" cellspacing="0" height="1" bordercolor="#000000" style="main" border="0"');
message('You don\'t have permissions to access the Podcast control','User Notice:', NULL,NULL,NULL);
This is only the one case that handles the podcast processing, the rest of the file is about 800 lines of code that use PEAR/QuickForm and other query functions.
I've started scanning around for any thing in the connected processing that might have anything to remotely do with this. I suspect I may have used a variable name twice or something.