ProAnswers.org

What is the use of mysql_real_escape_string() function?

It is used to escapes special characters in a string for use in an SQL statement

Write down the code for save an uploaded file in php.

if ($_FILES["file"]["error"] == 0)

{

move_uploaded_file($_FILES["file"]["tmp_name"],

      "upload/" . $_FILES["file"]["name"]);

      echo "Stored in: " . "upload/" . $_FILES["file"]["name"];

}