this is the HTML code
<input type="file" name="event_image" class="form-control ChangeEvntImage UploadEventImage tab5-required-check" value="<?=$v_image['image']?>">
This is my output:
I want this:
this is the HTML code
<input type="file" name="event_image" class="form-control ChangeEvntImage UploadEventImage tab5-required-check" value="<?=$v_image['image']?>">
This is my output:
I want this:
As @kerbholz said you have to write javascript.May be this code help you to solve the your problem.
HTML
<!DOCTYPE html>
<html>
<head>
<link class="jsbin" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js"></script>
<meta charset=utf-8 />
</head>
<body>
<input id="image" type="file" name="event_image" class="form-control ChangeEvntImage UploadEventImage tab5-required-check" value="<?=$v_image['image']?> ">
</body>
</html>
SCRIPT
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#image')
.attr('src', e.target.result)
.width(150)
.height(200);
};
reader.readAsDataURL(input.files[0]);
}
}