The connection and setting are fine as I can insert things into the same db with different tables.
Long story short below is the value that I want to insert into the db but it give me no error and nothing insert. I have use the echo and checked every field have a value...
"data"
1 id int(6) No None AUTO_INCREMENT
2 title varchar(80) latin1_swedish_ci No
3 docname varchar(80) latin1_swedish_ci No
4 version varchar(10) latin1_swedish_ci No None
5 Categroy varchar(30) latin1_swedish_ci No None
6 Sub_Categroy varchar(30) latin1_swedish_ci No None
7 Author varchar(50) latin1_swedish_ci No None
8 approval enum('approved', 'pending') latin1_swedish_ci No None
9 documentdir varchar(100) latin1_swedish_ci No None
10 description longtext latin1_swedish_ci No None
11 type varchar(20) latin1_swedish_ci No
12 size varchar(20) latin1_swedish_ci No
13 Updated_by varchar(80) latin1_swedish_ci No
14 md5hash varchar(32) latin1_swedish_ci No ctions More
15 Delete enum('0', '1') latin1_swedish_ci No None
16 date_added datetime
$title = trim($_SESSION['title']);
$docname = trim($_SESSION['docname']);
$Categroy = trim($_SESSION['Categroy']);
$Sub_Categroy = trim($_SESSION['Sub_Categroy']);
$author = trim($_SESSION['author']);
$docdir = trim($_SESSION['docdir']);
$description = trim($_SESSION['description']);
$size = trim($_SESSION['size']);
$type = trim($_SESSION['type']);
$md5 = trim($_SESSION['md5']);
$approval = trim($_SESSION['approval'] );
$version = trim($_SESSION['version'] );
$tempfile = trim($_SESSION['tempfile'] );
$Delete = 0;
$user=$_SESSION['user'];
$date = DATE('Y-m-d H:i:s');
$query = "INSERT INTO data (id, title, docname, version, Categroy, Sub_Categroy, Author, approval, documentdir, description, type, size, Updated_by, md5hash, Delete, date_added)
VALUES ('', '$title', '$docname', '$version', '$Categroy', '$Sub_Categroy', '$author', '$approval', '$docdir', '$description', '$type', '$size', '$user', '$md5', '$Delete', '$date')";
$results = mysql_query($query);
echo $title."</br>";
echo $docname."</br>";
echo $Categroy."</br>";
echo $Sub_Categroy."</br>";
echo $author."</br>";
echo $docdir."</br>";
echo $description."</br>";
echo $size."</br>";
echo $type."</br>";
echo $md5."</br>";
echo $approval."</br>";
echo $version."</br>";
echo $Delete."</br>";
echo $user."</br>";
echo $date."</br>";
after the echo, I got below result. But nothing insert into the table
Research Project
project.V1.3.02-07-2012.pdf
Type A
Small
8080
IT773
Research Project Report
932.424
pdf
e89eeb337b7895020eddb49ddf91f489
approved
V1.3
0
8080
2013-05-06 17:19:02
Ive checked the spelling but seem to be there is no mistake...I think I have a small mistake somewhere but just couldnt locat it...
thanks