Hello,
I am new to PHP as well as this list. I have taken another page that does work and
tried to modify it to use
a new MySQL table ("story"). I haven't made any major changes, but the new page does
not work.
Here is the page that works: http://phenon.com/nothing/favorite_color.php
Here is the page that does not: http://phenon.com/nothing/story_edit.php
I believe that the problem is in the following batch of code...
Thanks,
Tim
[EMAIL PROTECTED]
<form method="post" action="<?php echo $PHP_SELF?>">
<?php
if ($id) {
echo "<b>Edit Story:</b><br><br>";
$sql = "SELECT * FROM story WHERE id=$id";
$result = mysql_query($sql);
$myrow = mysql_fetch_array($result);
$id = $myrow["id"];
$title = $myrow["title"];
$body = $myrow["body"];
?>
<input type=hidden name="id" value="<?php echo $id ?>">
<?php
}
?>
<table border=0>
<tr valign=top>
<td>
<font face=verdana size=2>Title</font></td>
<td>
<input type="Text" name="title" value="<?php echo $title ?>" size=35></td>
</tr>
<tr valign=top>
<td>
<font face=verdana size=2>Story:</font></td>
<td>
<textarea name="body" ROWS=10 COLS=65 WRAP=on><?php echo $body ?></textarea></td>
</tr>
<tr>
<td>
</td>
<td>
<input type="Submit" name="submit" value="Enter Information"></td>
</tr>
</table>
</form>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]