This codes are not working here and i cant find out why is that can you help me on this
(here i gave the database also problem is not in DB)
CREATE TABLE `itinerary` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(1000) NOT NULL,
`name` varchar(1000) NOT NULL,
`days` varchar(10) NOT NULL,
`introduction` longtext NOT NULL,
`holiday_highlights` mediumtext NOT NULL,
`deatils` longtext NOT NULL,
`pic1` varchar(1000) NOT NULL,
`pic2` varchar(1000) NOT NULL,
`pic3` varchar(1000) NOT NULL,
`pic4` varchar(1000) NOT NULL,
`pic5` varchar(1000) NOT NULL,
`pic6` varchar(1000) NOT NULL,
`map` varchar(1000) NOT NULL,
`pre_accom` varchar(1000) NOT NULL,
PRIMARY KEY (`id`)
)
<?php
include ("../../init/db.php");
$type =$_POST['type'];
$name =$_POST['name'];
$days = $_POST['days'];
$introduction = $_POST['introduction'];
$holiday_highlights = $_POST['holidayh'];
echo $deatils1 =$_POST["itadetails"];
echo strlen($deatils);
$pre_accom = $_POST['pre_accom'];
mkdir('../../itinerary/'.$name, 0777);
$destination_path = '../../itinerary/'.$name.'/';
$lmap= $name.basename( $_FILES['map']['name']);
$img1= $name.basename( $_FILES['img1']['name']);
$img2= $name.basename( $_FILES['img2']['name']);
$img3= $name.basename( $_FILES['img3']['name']);
$img4= $name.basename( $_FILES['img4']['name']);
$img5= $name.basename( $_FILES['img5']['name']);
$img6= $name.basename( $_FILES['img6']['name']);
$target_path_lmap = $destination_path . $lmap;
$target_path_img1 = $destination_path .$img1;
$target_path_img2 = $destination_path .$img2;
$target_path_img3 = $destination_path .$img3;
$target_path_img4 = $destination_path .$img4;
$target_path_img5 = $destination_path .$img5;
$target_path_img6 = $destination_path .$img6;
if(@move_uploaded_file($_FILES['banner']['tmp_name'], $target_path_banner)
&&
@move_uploaded_file($_FILES['lmap']['tmp_name'], $target_path_lmap)&&
@move_uploaded_file($_FILES['img1']['tmp_name'], $target_path_img1)&&
@move_uploaded_file($_FILES['img2']['tmp_name'], $target_path_img2)&&
@move_uploaded_file($_FILES['img3']['tmp_name'], $target_path_img3)&&
@move_uploaded_file($_FILES['img4']['tmp_name'],$target_path_img4)&&
@move_uploaded_file($_FILES['img5']['tmp_name'], $target_path_img5)&&
@move_uploaded_file($_FILES['img6']['tmp_name'], $target_path_img6)
)
{
$resultw = $name." Uploading Success";
}else{
$resultw = "not success";
}
$path_lmap = 'hotels/'.$name.'/' . $lmap;
$path_img1 = 'hotels/'.$name .'/'.$img1;
$path_img2 = 'hotels/'.$name.'/'.$img2;
$path_img3 = 'hotels/'.$name .'/'.$img3;
$path_img4 = 'hotels/'.$name .'/'.$img4;
$path_img5 = 'hotels/'.$name .'/'.$img5;
$path_img6 = 'hotels/'.$name.'/'.$img6;
$sql="
INSERT INTO `helikro`.`itinerary` (
`id` ,
`type` ,
`name` ,
`days` ,
`introduction` ,
`holiday_highlights` ,
`deatils` ,
`pic1` ,
`pic2` ,
`pic3` ,
`pic4` ,
`pic5` ,
`pic6` ,
`map` ,
`pre_accom`
)
VALUES (
NULL , '$type',
'$name',
'$days',
'$introduction',
'$holiday_highlights',
'$deatils',
'$path_img1',
'$path_img1',
'$path_img1',
'$path_img1',
'$path_img1',
'$path_img1',
'$path_lmap',
'$pre_accom'
);
";
$result=mysql_query($sql);
?>