i have a page for user registration where i a form with a image tag to it.
i want the user to fill the form but as soon as he uploads the image i want the image uploaded to be displayed on the image tag.
Then i want all these form values+image to be stored in the database.
or the form values on database and the image file somewhere on the disk.
i am attaching the screenshot.
I am using MySQl for database. and PHP
here is the page code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<link rel="stylesheet" href="outpass.css" />
</head>
<body>
<form method="post" action="crt_stu_db.php">
<div class="box">
<h1>Outpass </h1>
<label>
<span>Full name: </span>
<input type="text" class="input_text" name="name" id="name" />
</label>
<label>
<span>Branch: </span>
<input type="text" class="input_text" name="branch" id="branch"/>
</label>
<label>
<span>Student Mobile No: </span>
<input type="text" class="input_text" name="smobile" id="smobile" />
</label>
<label>
<span>Enrollment No: </span>
<input type="text" class="input_text" name="eno" id="eno" />
</label>
<label>
<span>Hostel No: </span>
<input type="text" class="input_text" name="hostel" id="hostel" />
</label>
<label>
<span>Room No: </span>
<input type="text" class="input_text" name="room" id="room" />
</label>
<label>
<span>Father's/Gardian no: </span>
<input type="text" class="input_text" name="fmobile" id="fmobile" />
</label>
<label>
<span>Address: </span>
<textarea class="address" wrap="off" rows='2' cols='2' name="address" > </textarea>
</label>
<input name="student_image" style="position:absolute; top:100px; left:700px" width="150" height="150" type="image" id="student_image" src="200x200.jpg" align="right" />
<input name="image" id="stu_img" type="file" style="position:absolute;top:250px;left:700px; width:100px;" />
</div>
</form>
</body>
</html>