i am new in php… i had created a simple php file upload script given below…
form.php
<form action="uploader.php" method="post" enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<input type="submit" name="submit" value="Submit" />
</form>
uploader.php
<?php
move_uploaded_file($_FILES["file"]["tmp_name"],
"upload/" . $_FILES["file"]["name"]);
echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
?>
my question is i had created a mysql database account and a table student with 4 field id, name, age, image i want store my uploaded image path to these table, and display this image my web page where i want… have any simple solutions.? with example… sorry im just new in mysql
thanks….
i assumed you have already students in you database and change their profil image
a user must be logged in to upload images so you will use something like $_SESSION[‘studentid’]
later on if you want to display the user image use this query