Hi, I'm creating discussion forum with the aim of developing a script.
The current version of the script is shown by loading it chapter at a time into a dynamic table.

however, I am unsure how to refer to the contents of the table to do the edits. What I am aiming for is for the user to hover over a section to highlight it, or click to edit. This would then bring up the text in an editable second box, with the changes emailed to the script-writer.
I'm thinking some sort of ajax call?

I would really appreciate any broad pointers about how to do this - bearing in mind I am no PHP expert!

FWIW, the code so far...
PHP Code:
<?php
session_start
();
if((!
$_SESSION["first_name"])&&(!$_SESSION["second_name"]))
{
header("location:login.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Edit the Script</title>
<link href="m4.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="Scripts/edit.js"></script>

</head>

<body>
<img src="images/edit_script.gif" alt="edit the script" />
<div id="textedit" style="width:500px; vertical-align:top">
    <div id="controls" style="display:none">
        <a href="#" style="border:none">
            <img src="images/edit_sm.gif" alt="edit this section" width="70" height="45" />
        </a>
        <a href="javascript:hide()" style="border:none">
            <img src="images/exit.gif" alt="edit this section" width="70" height="45" />
        </a>
     </div>
<?php
require_once('mysql_login.php');
$query "SELECT * FROM script";
$scripttxt mysql_query($query);
//mysql_close();
echo "<table border='0'>";
echo 
"<tr> <th>Chapter</th> <th>Text</th></tr>";
// keeps getting the next row until there are no more to get
while($row mysql_fetch_array($scripttxt)) {
    
// Print out the contents of each row into a table
    
echo "<tr onmouseover=\"show()\"><td><strong>"
    echo 
$row['chapter'];
    echo 
"</strong></td><td>"
    
//construct textfile
    
include ("Chapter0".$row['chapter'].".txt");
    echo 
"</td></tr>";   


echo 
"</table>";
?>
</div>
<br />
or go to <a href="member.php">your page</a>?
</body>
</html>