How to insert image (jpeg/gif/bmp) into database from form into database using php.
Help me
How to insert image (jpeg/gif/bmp) into database from form into database using php.
Help me
Put this code in action file
and $userprofiles_photopath = your photo folder path.
$userprofiles_photopath = $_POST['userprofiles_photopath_hidden'];
if($userprofiles_photopath == '')
{
if($_FILES['userprofiles_photopath']['name'] != '')
{
$userprofiles_photopath = '../userphotos' . '/' . $_FILES['userprofiles_photopath']['name'];
$tmp_name=$_FILES['userprofiles_photopath']['tmp_name'];
move_uploaded_file($tmp_name, $userprofiles_photopath);
}
}
and in form you add this code
<form name="" id="" enctype='multipart/form-data'>
</form>
Put this code in action file
and $userprofiles_photopath = your photo folder path.
$userprofiles_photopath = $_POST['userprofiles_photopath_hidden'];
if($userprofiles_photopath == '')
{
if($_FILES['userprofiles_photopath']['name'] != '')
{
$userprofiles_photopath = '../userphotos' . '/' . $_FILES['userprofiles_photopath']['name'];
$tmp_name=$_FILES['userprofiles_photopath']['tmp_name'];
move_uploaded_file($tmp_name, $userprofiles_photopath);
}
}
and in form you add this code
<form name="" id="" enctype='multipart/form-data'>
</form>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks