I am trying to upload a file into the server.. but its not working. im coding in mvc and this is the view file which contains the form data.
<form id="frm" name="frm" method="get" enctype="multipart/form-data" action="">
<input type="file" name="file" /><input type="hidden" name="MAX_FILE_SIZE" value="2000000"/><input type="submit" name="upload" value="upload" /> </form>
this is the controller
if(isset($_GET['upload']))
{
$fname=$_FILES["file"]["name"];
$fsize=$_FILES["file"]["size"];
$ftype=$_FILES["file"]["type"];
$ftname=$_FILES["file"]["tmp_name"];
echo("$fname". "<br />");
echo("$fsize". "<br />");
echo("$ftype". "<br />");
echo("$ftname". "<br />");
}
When i do it without mvc, using a normal html file uploading works fine.. but using the controller it just wont work. im not so experienced in mvc..i just cant figure it out and its giving me headache.. please some one help me on this...