jeddi
06-12-2006, 03:33 PM
Hi - hope you can help me on this one !
I am processing a form to upload an image
which contains:
<form name="main_fm" enctype ="multipart/form-data" action="aaa_process.php" method="POST">
<input type = 'hidden' name='run' value="on">
<input type="hidden" name ="MAX FILE SIZE" value="500000">
<input type = 'hidden' name='adref' value="<?php echo $A_ref ?>">
<div style='position:absolute; left:40px; top:320px' >
<input type="file" size="50" id = "u1" name="upLoad1"><br />
<input type="text" size="50" id = "n1" name="fName1" readonly>
</div>
<div style='position:absolute; left:500px; top:262px' >
<img height='160' width='160' id="image1" style='display:none' />
</div>
<div style='position:absolute; left:370px; top:280px' >
<input type="submit" value="Upload All Images"><br />
<input type="reset" value="Reset All Images" >
</div>
</form>
To help track down the problem, I have set
error_reporting(E_ALL);
In the script I have included an
print_r($_FILES);
This is the output:
Array ( [upLoad1] => Array ( [name] => curlydog.jpg [type] => image/jpeg [tmp_name] => C:\WINDOWS\TEMP\php59.tmp [error] => 0 [size] => 22660 ) )
(Looks fine to me )
But I get this error: :(
Notice: Use of undefined constant name - assumed 'name' in D:\Web\DW\DWyodbod\aaa_process.php on line 20
line 20 reads:
$N_pix1 = strip_tags(trim($_FILES['upLoad1'][name]));
Does anyone know whats going wrong ?
Thanks :)
I am processing a form to upload an image
which contains:
<form name="main_fm" enctype ="multipart/form-data" action="aaa_process.php" method="POST">
<input type = 'hidden' name='run' value="on">
<input type="hidden" name ="MAX FILE SIZE" value="500000">
<input type = 'hidden' name='adref' value="<?php echo $A_ref ?>">
<div style='position:absolute; left:40px; top:320px' >
<input type="file" size="50" id = "u1" name="upLoad1"><br />
<input type="text" size="50" id = "n1" name="fName1" readonly>
</div>
<div style='position:absolute; left:500px; top:262px' >
<img height='160' width='160' id="image1" style='display:none' />
</div>
<div style='position:absolute; left:370px; top:280px' >
<input type="submit" value="Upload All Images"><br />
<input type="reset" value="Reset All Images" >
</div>
</form>
To help track down the problem, I have set
error_reporting(E_ALL);
In the script I have included an
print_r($_FILES);
This is the output:
Array ( [upLoad1] => Array ( [name] => curlydog.jpg [type] => image/jpeg [tmp_name] => C:\WINDOWS\TEMP\php59.tmp [error] => 0 [size] => 22660 ) )
(Looks fine to me )
But I get this error: :(
Notice: Use of undefined constant name - assumed 'name' in D:\Web\DW\DWyodbod\aaa_process.php on line 20
line 20 reads:
$N_pix1 = strip_tags(trim($_FILES['upLoad1'][name]));
Does anyone know whats going wrong ?
Thanks :)