title: Help to understand magic_quotes_gpc()
body: <p>i was learning this PHP code from a tutorial to upload files</p>
  
  <pre><code>&lt;form method="post" enctype="multipart/form-data"&gt;
    &lt;input name="userfile" type="file" id="userfile"&gt;  
  &lt;/form&gt;
  
  &lt;?php
    if (isset($_POST['upload']) &amp;&amp; $_FILES['userfile']['size'] &gt; 0) {
      $fileName = $_FILES['userfile']['name'];
      $tmpName  = $_FILES['userfile']['tmp_name'];
      $fileSize = $_FILES['userfile']['size'];
      $fileType = $_FILES['userfile']['type'];
  
      $fp      = fopen($tmpName, 'r');
      $content = fread($fp, filesize($tmpName));
      $content = addslashes($content);
      fclose($fp);
  
     if (!get_magic_quotes_gpc()) {
       $fileName = addslashes($fileName);
     }
  
     include 'library/config.php';
     include 'library/opendb.php';
  
     $query = "INSERT INTO upload (name, size, type, content ) ".
       "VALUES ('$fileName', '$fileSize', '$fileType', '$content')";
  
     mysql_query($query) or die('Error, query failed');
     include 'library/closedb.php';
  </code></pre>
  
  <p>now i understand every function and everything by using php documentation</p>
  
  <p><strong>EXCEPT</strong></p>
  
  <pre><code>get_magic_quotes_gpc()
  </code></pre>
  
  <ul>
  <li>WHAT is it? What it does?</li>
  <li>Is it eseential? If yes, Is there a replacement for this?</li>
  <li>the PHP Manual said "This feature has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.". Elaborate please?</li>
  <li>Isn't there a way to upload files to (web)server harDisk and provide links to them..</li>
  </ul>