Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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";
}
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900