title: How to correctly set a date using datepicker?
body: <p>I have 3 pages:</p>
  <pre><code>registration
  all values
  detail page
  </code></pre>
  <p>Once I register all the values ​​on the registration page, and go to the page where I see all my results, obviously as I set I get the date of a value, so far nothing strange, when I then go to the information page of the product, where I can change the values ​​of the product, through a while loop I get out all the information of that product.</p>
  <p>Here the problem begins, I have information about my product that is:</p>
  <pre><code>first name
  height
  weight
  Expiration date
  </code></pre>
  <p>example:</p>
  <pre><code>Jar
  20cm
  1kg
  05/20/2019
  </code></pre>
  <p>Summarizing everything, I have these values ​​and I'm on the information page of the individual product, this page allows me to be able to modify the values ​​of the product.</p>
  <p>If I change only the name, not touching the date, automatically the date from the correct format set during registration, changes me in the db in:00/00/0000</p>
  <p>Every time I want to change a value within the single product I have to select the date again even if it is perfectly correct and inserted in the db, visible from the while loop, I don't understand why</p>
  <h3>Code for datepicker:</h3>
  <pre><code> &lt;div class=&quot;col-md-6&quot;&gt;
      &lt;div class=&quot;md-form&quot;&gt;
           &lt;input name=&quot;scadenza_richiesta&quot;  value=&quot;&lt;?php echo formato_data_scad_rich($row['scadenza_richiesta']) ;?&gt;&quot;  type=&quot;text&quot; id=&quot;scadenza_richiesta&quot; class=&quot;form-control datepicker&quot;&gt;                                   
          &lt;label for=&quot;Form-email1&quot; &gt;Scadenza Richiesta&lt;/label&gt;
      &lt;/div&gt;
      &lt;script type=&quot;text/javascript&quot;&gt;
          $('#scadenza_richiesta').pickadate({
          format: 'yyyy/mm/dd',
          formatSubmit: 'yyyy/mm/dd',
          hiddenPrefix: 'prefix__',
          hiddenSuffix: '__suffix',
          min : true,
          });
      &lt;/script&gt;  
  &lt;/div&gt;
  </code></pre>
  <p>image before the first registration about the product:
  <a href="https://i.stack.imgur.com/OEbQP.png" rel="nofollow noreferrer">image</a></p>
  <p>Update code:</p>
  <pre><code>&lt;?php
  if (isset($_POST['submit'])) {
  $id = $connessione-&gt;real_escape_string($_POST['ID_Richiesta']);
  $titolo_richiesta = $connessione-&gt;real_escape_string($_POST['titolo_richiesta']);
  $dettagli_richiesta = $connessione-&gt;real_escape_string($_POST['dettagli_richiesta']);
  $scadenza_richiesta = $connessione-&gt;real_escape_string($_POST['scadenza_richiesta']);
  $token_richiesta = $connessione-&gt;real_escape_string($_POST['token_richiesta']);
  $categoria_richiesta = $connessione-&gt;real_escape_string($_POST['categoria_richiesta']);
  
  $connessione-&gt;query(&quot;UPDATE richieste SET
  categoria_richiesta='$categoria_richiesta',
  titolo_richiesta='$titolo_richiesta',
  dettagli_richiesta='$dettagli_richiesta',
  scadenza_richiesta='$scadenza_richiesta',
  token_richiesta='$token_richiesta'
  WHERE ID_Richiesta ='$id'&quot;);
  
  header(&quot;Location: richieste.php?ed_rich=Y&quot;);
  }
  ?&gt;
  </code></pre>