title: How to hide/protect password details in php?
body: <p>I'm making a website in which I'm trying to  create a form that will send the user-input to a google spreadsheet in my google docs/drive... I found a Github project that lets people code the php... It includes 2 other php files which are needed for the script. The code is as follows:</p>
  
  <p>My question is, how can I hide my password from this script under $u = / $p = ?? 
  Anyone viewing the code can see my password.. how can I prevent that?</p>
  
  <p>Link to the script's source is : <a href="http://www.farinspace.com/saving-form-data-to-google-spreadsheets/" rel="nofollow">http://www.farinspace.com/saving-form-data-to-google-spreadsheets/</a></p>
  
  <pre><code>&lt;?php
  
  // Zend library include path
  set_include_path(get_include_path() . PATH_SEPARATOR . "$_SERVER[DOCUMENT_ROOT]/ZendGdata-1.8.1/library");
  
  include_once("Google_Spreadsheet.php");
  
  $u = "username@gmail.com";
  $p = "password";
  
  $ss = new Google_Spreadsheet($u,$p);
  $ss-&gt;useSpreadsheet("My Spreadsheet");
  $ss-&gt;useWorksheet("wks2");
  
  // important:
  // adding a leading alpha char prevents errors, there are issues 
  // when trying to lookup an identifier in a column where the 
  // value starts with both alpha and numeric characters, using a
  // leading alpha character causes the column and its values to be 
  // seen as a strictly a strings/text
  
  $id = "z" . md5(microtime(true));
  
  $row = array
  (
      "id" =&gt; $id // used for later lookups
      , "name" =&gt; "John Doe"
      , "email" =&gt; "john@example.com"
      , "comments" =&gt; "Hello world"
  );
  
  if ($ss-&gt;addRow($row)) echo "Form data successfully stored";
  else echo "Error, unable to store data";
  
  $row = array
  (
      "name" =&gt; "John Q Doe"
  );
  
  if ($ss-&gt;updateRow($row,"id=".$id)) echo "Form data successfully updated";
  else echo "Error, unable to update spreadsheet data";
  
  ?&gt;
  </code></pre>