Below is a script that i wrote. I am hoping that it will take the: edit_runner.php?cid=24 value cid=24 and find that information in the table within my dba and place that informtion in the form bellow. However When i click my link to edit from the edit_runner.php page i get a blank page. With no errors I have tried outputting the query but just get a blank page does anyone have suggestions? I have also bellow my form.
f(isset($_GET['cid']))
{
$query = "SELECT cid, first, last, year, age, gender ".
"FROM collegiate ".
"WHERE cid = '{$_GET['cid']}'";
$result = mysql_query($query) or die('Error : ' . mysql_error());
list($cid, $first, $last, $year, $age, $gender) = mysql_fetch_array($result, MYSQL_NUM);
$content = htmlspecialchars($content);
}
?>
<form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="hidden" name="cid" value="<?=$cid;?>">
<table width="500" border="0" cellpadding="2" cellspacing="1" class="box" align="center">
<tr>
<td width="100">first</td>
<td><input name="first" type="text" class="box" id="first" value="<?=$first;?>"></td>
</tr>
<tr>
<td width="100">last</td>
<td><input name="last" type="text" class="box" id="last" value="<?=$last;?>"></td>
</tr>
<tr>
<td width="100">year</td>
<td><input name="year" type="text" class="box" id="year" value="<?=$year;?>"></td>
</tr>
<tr>
<td width="100">age</td>
<td><input name="age" type="text" class="box" id="age" value="<?=$age;?>"></td>
</tr>
<tr>
<td width="100">gender</td>
<td><input name="gender" type="text" class="box" id="gender" value="<?=$gender;?>"></td>
</tr>
<tr>
<td width="100"> </td>
<td> </td>
</tr>
<tr>
<td colspan="2" align="center">
<input name="update" type="submit" class="box" id="update" value="Update Article"></td>
</tr>
</table>
<p align="center"><a href="add_manage_coll.php">Back to admin page</a></p>
</form>