hope everyone is fine there, i just wanted to ask that i want to display the image im storing in the database using php.. but i dont know how to display it, would i be able to retrieve it simply by echoing?? im not getting how would the whole process will go..please help..heres my code
thnx for ur time :))
<form id="form" method="post" action="update-profile-action.php" enctype="multipart/form-data">
<label for="Fname">First Name:</label> <input type="text" id="Fname" class="text" value="<?php echo $firstname; ?>" name="Fname" /> <br /><br />
<label for="Lname">Last Name:</label> <input type="text" id="Lname" class="text" value="<?php echo $lastname; ?>" name="Lname" /><br /> <br />
<?php
if ($_SESSION["type"]=="T")
{
?>
<label>Profile Image:</label> <input type="file" name="profileimg" value="" /><br /><br />
<label>Qualification:</label><br />
<textarea name="qualification" class="text" id="qualification"><?php echo $qualification;?></textarea><br /><br />
<label>Education & Teaching History:</label><br />
<textarea name="briefintro" class="text" id="intro"><?php echo $briefintro; ?></textarea><br /><br />
<?php
}
?>
<input type="submit" class="mybutton" value="Update Profile" />
</form>
and this is update-profile-action.php
<?php include("../includes/config.php");?>
<?php
$Fname=$_POST["Fname"];
$Lname=$_POST["Lname"];
$image=$_FILES["profileimg"];
$briefintro=$_POST["briefintro"];
$qualification=$_POST["qualification"];
$con=mysql_connect($dbserver,$dbusername,$dbpassword);
if (!$con) { die('Could not connect: ' . mysql_error()); }
mysql_select_db($dbname, $con);
$query=("UPDATE accounts SET firstname='".$Fname."' , lastname='".$Lname."' , profileimg='".$image."' , briefintro='".$briefintro."', qualification='".$qualification."' WHERE id=".$_SESSION['id']);
$result = mysql_query($query);
header("Location: update-profile.php?status=3");
mysql_close($con);
?>