Both $_REQUEST['projectid'] and $projectid echo 27. That is the correct id!
Here is the entire code for this page, maybe someone can spot something that I have missed.
<?php
include "conn.inc.php";
$projectid = $_REQUEST['projectid'];
$query = "SELECT * FROM student_project WHERE project_ID='$projectid' ";
$result =mysql_query($query);
$row = mysql_fetch_assoc($result);
if (isset($_POST['submit']) && $_POST['submit'] == "Update Project") {
$update = "UPDATE student_project " .
"SET lecturer_role= ". $_POST['role'] .", " .
"project_name=". $_POST['project_name'] .", " .
"project_desc=". $_POST['project_desc'] ." " .
"WHERE project_ID=$projectid ";
$result = mysql_query($update); echo $update;
}
if ($result) {
?>
<p>
<form action = "editproject.php" method="post">
<table border="0" cellpadding="15" bgcolor="#E6E6E6">
To update project details, add and remove as necessary and then press 'Update Project'.
<tr class="feature">
<td><span class="style3"><b>Current Lecturer Role</b><br>
</span></td>
<td>
<span class="style3">
<input type="radio" name="role" value="Supervisor"
<?php echo $row['lecturer_role']=='Supervisor' ? ' checked' : '';?>>
Supervisor<br>
<input type="radio" name="role" value="Second Marker"
<?php echo $row['lecturer_role']=='Second Marker' ? ' checked' : '';?>>
Second Marker<br>
<input type="radio" name="role" value="Third Marker"
<?php echo $row['lecturer_role']=='Third Marker' ? ' checked' : '';?>>
Third Marker<br>
<input type="radio" name="role" value="Fourth Marker"
<?php echo $row['lecturer_role']=='Fourth Marker' ? ' checked' : '';?>>
Fourth Marker<br>
</span></td>
</tr>
<br>
<tr class="feature">
<td><span class="style3"><b>Current Project Name</b></span></td>
<td><input name="project_name" type="text"
value="<?php echo $row['project_name']; ?>" size="61">
</td>
</tr>
<br>
<tr class="feature">
<td><span class="style3"><b>Current Project Description</b></span></td>
<td><input name="project_desc" type="text"
value="<?php echo $row['project_desc']; ?>" size="61">
</td>
</tr>
<td colspan="2">
<input type="hidden" name="project_ID" value="<?php echo $row['projectid']; ?>" />
<input type="submit" name="submit" value="Update Project">
<?php } ?>
</td>
</tr>
</table>
</form>
</p>