0

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...

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by shubhamjain1
0

Oh! thanx :) what a stupid mistake.. Its just i used to use get method for mvc. im really a mvc beginner and i would like to have some clearly explained good resources to read for php in mvc.. can some one give me some good links? to code from scratch before using any frameworks...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.