I want o store multiple images in database in one column using php. i tried this code
enter code here
<html>
<head>
<title>more option in shop detail register form </title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data">
Image1 | <input type="file" name="image"> |
Image2 | <input type="file" name="image"> |
Image3 | <input type="file" name="image"> |
Shop | <input type="text" name="shop"> |
Shop Details | <input type="text" name="shopdetails"> |
Phone | <input type="text" name="phone"> |
Available On | <input type="text" name="availableon"> |
| <input type="submit" name="submit" value="Submit"> |
</form>
</body>
</html>`enter code here`$msg="";
if(isset($_POST['submit']))
{
$filename =$_FILES['image']['name'];
$temppath =$_FILES['image']['tmp_name'];
$move =move_uploaded_file($temppath,'upload/'.$filename);
$shop=$_POST['shop'];
$shopdetails=$_POST['shopdetails'];
$phone=$_POST['phone'];
$availableon=$_POST['availableon'];
$query="insert into details(image,shop,shopdetails,phone,availableon)values('$filename','$shop','$shopdetails','$phone','$availableon')";
$sql=mysql_query($query);
if($sql)
{
$msg.="Thank you for registering here";
}
else
{
$msg.="try again";
}
}