the story_id gets posted from the previous page, here is the code i have so far:
<?php
require_once 'config.php';
$db =& DB::connect($dsn, $options);
if (DB::isError($db)) {
die($db->getMessage());
}
$sql = 'Select * From stories WHERE story_id=".story_id."';
$result =& $db->query($sql)
or die ("couldn't execute query.");
if (DB::isError($result)) {
die($result->getMessage());
}
while ($row =& $result->fetchRow(DB_FETCHMODE_ASSOC))
{
extract($row);
}
?>
<table width=725 border=0 cellspacing=0 cellpadding=0>
<tr>
<td>
Choose Category</td><td>
</td>
</tr>
<tr>
<td width=111>Headline</td>
<td width=614><input name=headline type=text id=headline value=<? echo $row['headline']; ?>></td>
</tr>
<tr>
<td>Description</td>
<td><input name=story_desc type=text id=story_desc value=<? echo $row['story_desc']; ?>></td>
</tr>
<tr>
<td>Text</td>
<td><input name=story_text type=text id=story_text value=<? echo $row['story_text']; ?>></td>
</tr>
<tr>
<td>Picture</td>
<td><input name=picture type=file id=picture value=<? echo $row['picture']; ?>></td>
</tr>
<tr>
<td>Select Target </td>
<td><select name='target'>
<option>Select One</option>
<option value='blank' name='$target'>Blank
<option value='parent' name='$target'>Parent
<option value='self' name='$target'>Self
<option value='top' name='$target'>Top
</select>
Currently set to: <? echo $target; ?></td>
</tr>
</table>
the text fields dont pick up anything from the database, thanks for helping.