Following is my code and I'm not able to write insert query and upload file.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.js"> </script>
<script src="http://cdn.jquerytools.org/1.2.6/full/jquery.tools.min.js"></script>
<!-- This JavaScript snippet activates those tabs -->
<script type="text/javascript">
$(function() {
$("div.tabs").tabs("div.panes > div");
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#share').click(function(){
var status=$("#content").val();
var file=$("#filecontent").val().replace(/C:\\fakepath\\/i, '');
var DATA = 'status=' + status + '&file=' + file + '&share=true';
$.ajax({
type: "POST",
url: "insert.php",
data: DATA,
success: function() {
alert (DATA);
}
});
return false;
});
});
</script>
<style type="text/css">
li
{
display: inline;
list-style-type: none;
padding-right: 20px;
}
</style>
</head>
<body>
<div class="tabs">
<!-- the tabs -->
<ul>
<li><a href="#">Status</a></li>
<li><a href="#">Photo</a></li>
<li><a href="#">Question</a></li>
</ul>
</div>
<!-- tab "panes" -->
<div class="panes" >
<div><textarea class="input" name="status" id="content" >So what's on your mind?</textarea></div>
<div><input type="file" name="file" id="filecontent"/></div>
<div>Ask question<input type="text" name="question" id="question"/></div>
</div>
<br />
<div class="button_outside" id="share">
<div class="button_inside">Share</div>
</div>
</body>
</html>