upload image (win]
From: Alexandre Jaquet (no_at_email.com)
Date: 12/28/04
- Next message: Kevin: "Re: upload image (win]"
- Previous message: Daniel Tryba: "Re: Parse error: parse error, unexpected T_ELSE"
- Next in thread: Kevin: "Re: upload image (win]"
- Reply: Kevin: "Re: upload image (win]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Dec 2004 12:49:56 GMT
Hi,
I can't figure what I've doing wrong with my code :
in my Form :
<form name="form1" method="post" action="do_inscription.php">
<p align="center"><img src="images/logo.jpg" width="400" height="80"></p>
<div align="center">
<table width="500" border="0">
..
<td><input name="avatard" type="file" id="avatard"
enctype="multipart/form-data"></td>
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
..
in my "action script" :
....
$file = $HTTP_POST_FILES['avatard'];
if ($file && $file['size']<=1024000000 && $file['size']>0){
if (copy($file['tmp_name'],"./avatard/".$file['name'])){
echo "Fichier Uploadé";
} else echo "L'upload à échoué.";
}else echo "Fichier trop volumineux ou innexistant";
...
When I execute this script I get this error message : Undefined index: avatard
File to big or inexistant (translated from french(
thx in advance
- Next message: Kevin: "Re: upload image (win]"
- Previous message: Daniel Tryba: "Re: Parse error: parse error, unexpected T_ELSE"
- Next in thread: Kevin: "Re: upload image (win]"
- Reply: Kevin: "Re: upload image (win]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]