<?php
//include('db.php');
//session_start();
//$session_id='my_name_is_ali'; //$session id
?>
<html>
<head>
<title>Ajax Image Upload 9lessons blog</title>
</head>

<script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="scripts/jquery.form.js"></script>

<script type="text/javascript" >
 $(document).ready(function() { 
		
            $('#photoimg').live('change', function()			{ 
			           $("#preview").html('');
			    $("#preview").html('<img src="loader.gif" alt="Uploading...."/>');
			$("#imageform").ajaxForm({
						target: '#preview'
		}).submit();
		
			});
       	


	//document.getElementById('fr').value = document.getElementById('tt').value;
	
	  //$('#asdf').load(function(){
       //$('#fr').val() = $('#asdf').contents().find('#tt').html();
    //});

 }); 
</script>

<style>

body
{
font-family:arial;
}
.preview
{
width:50%;
height:45%;
border:solid 1px #dedede;
padding:1px;
display:inline-block; vertical-align:top;
margin-top:0px;
}
#preview
{
width:auto;
height:auto;
display:inline-block; vertical-align:top;
margin-top:0;
background:none;
margin-left:50px;
font-size:0.8em;
color:#F00;
}


.file-upload {
	position: relative;
  overflow: hidden;
  margin:auto;
  margin: 10px;
  color:#fff;
  width:350px;
  height:50px;
  background:#2384db;
  
   }

.file-upload input.file-input {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  padding: 0;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  filter: alpha(opacity=0); }
  
  
</style>
<body>



<div style="width:470px; display:inline-block; vertical-align:top;">

<form id="imageform" method="post" enctype="multipart/form-data" action='ajaximage.php'>
<button class="file-upload">  
Upload Blog Image and Copy Image URL !<input type="file" name="photoimg" id="photoimg" class="file-input" />
</button>
<?php //include_once("../registration/ifr.php"); ?>
</form>
<div id='preview'>
</div>

</div>

<?php

//echo getmyinode();
?>


</body>
</html>