I'm a newbie in php programming. I'm currently creating a user profile in which i need to allow users to upload a profile picture. So I've coded like this
<?php echo form_open_multipart('','class="form-horizontal span4"');?>
<img src="PATH TO IMAGE" />
<input type="text" name="userfile" />
<input class="btn" type="submit" value="Upload" />
<?php echo form_close();?>
and so I'm getting a structure like the one above.

But what I need is something like the one in the second image.Is this possible... If yes please help or at least share a link.

