4bdulmobeen
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Downloads
Gallery
Store
Posts posted by 4bdulmobeen
-
-
file upload
in PHP
we can upload file to server through move_uploaded_file function of php
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<!--
hi there!
you can upload the file to the server using move_uploaded_file() function...
consider u have the form like this:
-->
<div align="center" >
<h2>Welcome To Our Site</h2>
<p>Lets upload a file for testing purposes</p>
<form action="uploadFile.php" method="post" enctype="multipart/form-data" >
<input type="file" name="profileImage" /><br>
<input type="submit" value="Upload File" /><br>
</form>
</div>
<!--
when u'll click on the Upload File button then the script i.e uploadFile.php specified in action attribute of the above form will perform the task to move the uploaded file to the server...
here the code for uploadFile.php
$fileName = $_FILES['profileImage']['name']
which is original name of file.
$path="C:uploadFiles/images/".$fileName;
which is the path where i want to place the uploaded file.
move_uploaded_file($_FILES['profileImage']['tmp_name'],$path);
here $_FILES['profileImage']['tmp_name'] is the temperory file uploaded on the server.. we wana move it from the that location to our own specified directory/folder...
so the function move_uploaded_file() moves the file to the path specified
-->
</body>
</html>
Requesting help of inserting exploded data into sql database
in PHP
Posted
you should use serialize() function to insert it into the database... when u get it back from db..use unserialize() function..
Hope it'll help u..