Forum Moderators: coopster

Message Too Old, No Replies

upload include problem.

         

firemaster

3:19 am on Oct 5, 2005 (gmt 0)

10+ Year Member



okay so here is the problem I am working on a small script which for it to work you have to fill out a form and upload an image, the upload script works fine, but the problem:

all.php?a=0 [switch]
-----------
include("form.php"); => all.php?a=1

all.php?a=1 [switch]
-----------
include("form_fns.php");

All the $_POST variables in the form process except for the $_FILES image I can't get it to work...

if (empty($_FILES['imgfile'])) $errormess .= "Image File<br>";

$errormess == "Image File"

thanks for the help,
Mike

firemaster

3:45 am on Oct 6, 2005 (gmt 0)

10+ Year Member



help please someone.
Thanks much!
-Mike

coopster

1:12 pm on Oct 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Have you tried dumping the $_FILES [php.net] superglobal to the browser yet to see what it contains upon a successful form submission?
<?php 
print '<pre>';
print_r($_FILES);
print '</pre>';
?>

firemaster

5:05 am on Oct 9, 2005 (gmt 0)

10+ Year Member



it comes up as an empty array( ) I don't know why.. the include shouldn't effect this should it?
thanks,
-Mike

coopster

6:14 pm on Oct 10, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Hard to tell since I don't know what is in each of your files, but no matter. Have a closer look at your form once it is being displayed in the browser. Particularly the <form> element itself. Is it setup correctly?