Rainrays Profiles
   Pregnancy & Care | Submit Your Free Ads | Tours & Travel India

Home rainrays profile world Contact Us Online Free Marketing Aadhaar Card Online Free Marketing Pregnancy & Care Online Free Marketing Tour n Travel Free Ads with rainrays Festivals  Tourist Attraction India Pincode India  Tourist Attraction India Tourist Attraction India Jobs Recipes Jobs Select Babies Name

Custom Search
More Topics...
  Pregnancy tips and care  Pregnancy tips and care
 YouTube Videos YouTube Videos
  Hospitals & clinics in India Hospitals & clinics in India
  Hospitals & clinics in India World Travel Tips
 Kitchen Dictionary Kitchen Dictionary
 Recipes Recipes
 Personality Personality
 Institute/Colleges Institute/Colleges
 Indian Festivals Indian Festivals
 University University
 Restaurant Restaurant
 Districts List in India Districts List in India
 Districts Profile of India Districts Profile of India
 Hotels Hotels
 Love dating and Romance Love dating and Romance
 Baby name list Baby name list
 Jobs by location Jobs by location
 Jobs by Keyword Jobs by Keyword
 Jobs by Function Jobs by Function
 Jobs Part Time Jobs Part Time
 Shayari Shayari

Best Indian Tours
 Week End Tours  Week End Tours
 Wildlife tours Wildlife tours
 Honeymoon  Honeymoon Tours
 Religious Tours Religious Tours
 Religious Tours International Tours
 Religious Tours Indian Tours for Overseas

File Upload using php

  Topic » Language » PHP » php problems
Post By : Sonam jha At 2010-07-15

File Upload using php

$target_path = $target_path . basename( $_FILES['my-file']['name']);

if(move_uploaded_file($_FILES['my-file']['tmp_name'], $target_path)) {
    echo "File Uploaded";
} else{
    echo "Some error uploading the file, please try again!";


The $_FILES array is where PHP stores all the information about files. There are two elements of this array that we will need to understand for this example.

my-file - my-file is the reference we assigned in our HTML form. We will need this to tell the $_FILES array which file we want to play around with.
$_FILES['my-file']['name'] - name contains the original path of the user uploaded file.
$_FILES['my-file']['tmp_name'] - tmp_name contains the path to the temporary file that resides on the server. The file should exist on the server in a temporary directory with a temporary name.



Create a Cookie

A cookie is used to identify a user. A cookie is a small info file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, browser send it to server.Cookie is a client side info, we can retrive this. With following function we can create Cookie The setcookie() function is used to set a cookie. Note: The setcookie() function must appear BEFORE the tag. setcookie(name, value, expire_date, path, domain);


Refer to Friend

  Rainryas information World

Share Info/View About Profile Or Any Comment

Your Name:*  
Other Topic
Asia Sulphur Springs, Manali
Village in Dudhi Tehsil
Communications jobs in India
Ketti :: CSI College of Engineering
Apprentice jobs in India
Create Your Profile in Category » php problems
Related Content..
 325  Create a Cookie
 324  Php headers solution
Special Tours Type India
 Week End Tours  Week End Tours
 Wildlife tours Wildlife tours
 Honeymoon  Honeymoon Tours
 Religious Tours Religious Tours
 International Tours International Tours
 Tours for Overseas Indian Tours for Overseas
More on rainrays.com
Top Links : Contact us | About us | Privacy & Policy | Terms & Condition | Extract Email | Submit URL to Search Engine
Jobs : Jobs by Location | Part Time Jobs | Jobs by Function | Jobs by Keyword | Jobs Out of india | Jobs Search Engine
Other Links
    Girl baby Names | Boy baby Names | Love dating and Romance | University | Restaurants in India | Hotels in India | Hospitals & clinic | Pregnancy & Care
    Coaching Institute | Educational Institution | School/Colleges by Loaction | Recipes | Std Code | PHP | Products | Links | PHP Interview Question

Copyright © 2010 --- All Rights Reserved