Is it just me or are you missing a <form action="" method=""></form> tag?
That'd explain the form not posting...

Mike

sam rumaizan skrev:
  I'm just a php beginner.
  So please be patient with my stupid questions.
What am I missing in this code that causing the function can’t update the textarea? Update button erase the old information from mysql database and replace it with nothing. Basically it can’t read what is inside the Textarea box. Why?? Read the highlighted code. <?php
if (isset($_REQUEST['save_assign_engineer'])) {
    $id = (int) $_REQUEST['save_assign_engineer'];
    $job_title =
mysql_real_escape_string($_REQUEST['Assign_Engineer'][' .$id . ']['Job_Title']);
    $sql = "
        UPDATE `lo_data`
        SET `Job_Title` = '" . $job_title . "'
        WHERE `ID` = " . $id;
    mysql_query($sql);
}
if (isset($_POST["R"])) {
    $result = mysql_query("SELECT * FROM  lo_data WHERE Assign_Engineer 
='".$_POST["R"]."'");
}
while($row = mysql_fetch_array($result))
{
    echo "<TBODY>";
    echo "<TR VALIGN=\"TOP\" ALIGN=\"CENTER\">";
    echo "<TD>{$row['ID']}</TD>";
    echo "<TD>{$row['Ref_No']}</TD>";
      echo '<TD> <P><TEXTAREA NAME="Assign_Engineer[' . $row['ID'] . '][Job_Title]" 
ROWS="10"
      COLS="40">'.$row['Job_Title'] .'</TEXTAREA>';
      echo " <BR />";
  echo '<button type="submit" name="save_assign_engineer" value="' .
$row['ID'] . '" />Updaet data</button>
';
      echo "<TD>{$row['Category']}</TD>";
    echo "<TD>{$row['Assign_Engineer']}</TD>";
    echo "<TD>{$row['Date_Received']}</TD>";
    echo "<TD>{$row['Date_Required']}</TD>";
    echo "<TD>{$row['Date_Assigned']}</TD>";
    echo "<TD>{$row['ProjectedCompletionDate']}</TD>";
    echo "<TD>{$row['Date_Completed']}</TD>";
    echo "<TD>{$row['ManhourSpent']}</TD>";
    echo "<TD>{$row['Status']}</TD>";
    echo "</TR>";
    echo"</TBODY>";
}
?>


--------------------------------- Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to