norm,
i hv tried the code and it works....but not fully....the data is not entering the database though...there is no error....picture is uploaded but data not entered to the database...let me show u the whole code that i wrote....
code:
<?php
include("dbconnect.php");
$eventTitle = $GET["txtEvetitle"];
$eventDate = $GET["txtDate"];
$eventDescription = $_GET["txtaDescription"];
/$query = "insert into tblNews (title,date,contents) values ('$eventTitle','$eventDate','$eventDescription')";
mysql_query($query) or
die (mysql_error());/
if(!file_exists("catalog")){
mkdir("catalog");
}
$uploaddir = "catalog/";
// check file
checkfile($FILES['file']['tmp_name'],$FILES['file']['size'],$FILES['file']['type'],50000);
$done;
// copy file if no error occured
if(!isset($error)){
$date = date("YmdHis");
$done = copy($FILES['file']['tmp_name'],$uploaddir.$date.'.jpg');
if ($done){
echo("done");
}
else{
echo("not done");
}
}
else{
echo($error[0]);
}
?>
note that the $done thing was just suppose for a testing purposes.....so can u tell me what is wrong?the data doesn't seem to enter the database....
thanx,....