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">
<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 type="text/javascript">
		var status=$("#content").val();
		var file=$("#filecontent").val().replace(/C:\\fakepath\\/i, '');		
		var DATA = 'status=' + status + '&file=' + file + '&share=true';		
		type: "POST",
		url: "insert.php",		
		data: DATA,
		success: function() {
		alert (DATA);
	  return false;	
<style type="text/css">
display: inline;
list-style-type: none;
padding-right: 20px;

<div class="tabs">
	<!-- the tabs -->
		<li><a href="#">Status</a></li>
		<li><a href="#">Photo</a></li>
		<li><a href="#">Question</a></li>

<!-- 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>
<br />
<div class="button_outside" id="share">
    <div class="button_inside">Share</div>
5 Years
Discussion Span
Last Post by diafol

'#share' function submit input and textarea fields without form tags.
Can u help me to write insert query?

where are your form tags?


You're trying to upload a file - I didn't know that you could do this without the enctype attribute of the form tag. If you can, accept my apologies.

You don't show your 'insert.php' code, which I assume will contain the insert query.

You're passing 3 post vars: share/filename/status

Accept these with $_POST... etc.
Clean them and prepare them for use in sql:
Include your mysql connection details
run the query

INSERT INTO table SET `share`='$cleanshare',`filename`='$cleanfile',`status`='$cleanstatus'
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.