Thanks Ashley for explaining to me.
Okay now after executing the ECHO QUERY I got this result in the output
UPDATE bookoutonloan SET datereturned = '' where borrowid = '15'
So the datereturned is empty.
=========================
Actually I was thinking that the TextFiled has to have array [] like what I did in CheckBox so I changed something like this or what I have to sign it exactly here?.
<input name="returneed[]" type="text" size="15" id="returneed[]" />
And I change the Foreach with For code like this in the second page:
<?php
include 'functions.php';
$submit = $_POST['checkfine'];
//$returned = $_POST["returneed"];
if (isset($submit))
{
for($i=0;$i<count($_POST['c']);$i++)
{
for($b=0; $b<count($_POST['returneed']); $b++)
{
$query = ("UPDATE bookoutonloan SET datereturned = '".$_POST['returneed'][$b]."' where borrowid = '".$_POST['c'][$i]."' ") ;
echo $query;
$final = mysql_query($query) or die(mysql_error());
}
}
}
?>
And this is the result that I get in the output by using Echo:
UPDATE bookoutonloan SET datereturned = '2010-04-22' where borrowid = '15' UPDATE bookoutonloan SET datereturned = '' where borrowid = '15'
The result that I got in the output by using Echo I got two UPDATE the first one I got the date that I entered and the second UPDATE showing nothing, and when I went to check in my database I found it 0000-00-00. So still I'm having problem. I hope if you could solve it please. Thanks for all for cooperation.