title: Php cannot read secure cookies
body: <p>Php cannot read secure cookies.</p>
  <p>Code(Javascript):</p>
  <pre><code>document.cookie = &lt;?php echo '&quot;'.$hCName.'=&quot;'; ?&gt; + host + &quot;; path=/; secure; HttpOnly&quot;;
  document.cookie = &lt;?php echo '&quot;'.$uCName.'=&quot;'; ?&gt; + username + &quot;; path=/; secure; HttpOnly&quot;;
  document.cookie = &lt;?php echo '&quot;'.$pCName.'=&quot;'; ?&gt; + password + &quot;; path=/; secure; HttpOnly&quot;;
  document.cookie = &lt;?php echo '&quot;'.$dNCName.'=&quot;'; ?&gt; + dbName + &quot;; path=/; secure; HttpOnly&quot;;
  document.cookie = &lt;?php echo '&quot;'.$dPCName.'=&quot;'; ?&gt; + dbPort + &quot;; path=/; secure; HttpOnly&quot;;
  </code></pre>
  <p>Code(Php):</p>
  <pre><code>&lt;?php
  include_once(&quot;../scripts/session_start.php&quot;);
  $host = $_COOKIE[$_SESSION['hCName']];
  $username = $_COOKIE[$_SESSION['uCName']];
  $password = $_COOKIE[$_SESSION['pCName']];
  $dbName = $_COOKIE[$_SESSION['dNCName']];
  $dbPort = $_COOKIE[$_SESSION['dPCName']];
  echo &quot;Host: &quot;.$host.&quot;, Username: &quot;.$username.&quot;, Password: &quot;.$password.&quot;, dbName: &quot;.$dbName.&quot;, dbPort: &quot;.$dbPort;
  ?&gt;
  </code></pre>
  <p><strong>Edit:</strong>
  I am getting:</p>
  <blockquote>
  <p>Notice: Undefined index: hCName in C:\Users\joonas\Desktop\Webon cms\root\install\createTables.php on line 3</p>
  <p>Notice: Undefined index: in C:\Users\joonas\Desktop\Webon cms\root\install\createTables.php on line 3</p>
  <p>Notice: Undefined index: uCName in C:\Users\joonas\Desktop\Webon cms\root\install\createTables.php on line 4</p>
  <p>Notice: Undefined index: in C:\Users\joonas\Desktop\Webon cms\root\install\createTables.php on line 4</p>
  <p>Notice: Undefined index: pCName in C:\Users\joonas\Desktop\Webon cms\root\install\createTables.php on line 5</p>
  <p>Notice: Undefined index: in C:\Users\joonas\Desktop\Webon cms\root\install\createTables.php on line 5</p>
  <p>Notice: Undefined index: dNCName in C:\Users\joonas\Desktop\Webon cms\root\install\createTables.php on line 6</p>
  <p>Notice: Undefined index: in C:\Users\joonas\Desktop\Webon cms\root\install\createTables.php on line 6</p>
  <p>Notice: Undefined index: dPCName in C:\Users\joonas\Desktop\Webon cms\root\install\createTables.php on line 7</p>
  <p>Notice: Undefined index: in C:\Users\joonas\Desktop\Webon cms\root\install\createTables.php on line 7
  Host: , Username: , Password: , dbName: , dbPort:</p>
  </blockquote>