A non well formed numeric value encountered php
<p>I am passing date from the database and set the value of dateforService, then I send the URL value to the other php file to update the db. But everytime I try to save in the db, it is saved as 0000-00-00.</p>

<p>Here are the codes below :</p>

<pre><code>echo "&lt;td&gt;&lt;input type= 'text' name = 'jobrequestnumber' value =".$row['jobrequestnumber']."&gt;&lt;/td&gt;"  ; // results in the same jobrequestnumbers
echo "&lt;td&gt;&lt;input type= 'text' name = 'requestingcompany' value =".$row['requestingcompany']."&gt;&lt;/td&gt;"    ;//this too
echo "&lt;td&gt;&lt;input type= 'date' name = 'dateforService' value =".$row['dateforService']."&gt;&lt;/td&gt;"  ;// this one also 
echo "&lt;td&gt;&lt;a href=\"update_request.php?jobrequestnumber={$row['jobrequestnumber']}&amp;requestingcompany={$row['requestingcompany']}&amp;dateforService={$row['dateforService']}\"&gt;Update&lt;/a&gt;&lt;/td&gt;";
</code></pre>

<p>So I tried to echo the value right before the update codes below:
then It comes out with the correct date format. </p>

<pre><code>if (empty($errors)){
$jobrequestnumber = $_GET['jobrequestnumber'];
$requestingcompany = $_GET['requestingcompany'];
$dateforService = date("Y-m-d", strtotime($_GET['dateforService']));
    $query =    "UPDATE jobrequest SET 
                        requestingcompany = '{$requestingcompany}',
                        dateforService = $dateforService 
                    WHERE jobrequestnumber ={$jobrequestnumber}";
</code></pre>

<p>I appreciate your pieces of advice, Thanks a lot.</p>
