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...



<form method="post" action="<?php echo $PHP_SELF?>">


   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 ?>">




   <table border=0>
  <tr valign=top>
    <font face=verdana size=2>Title</font></td>
    <input type="Text" name="title" value="<?php echo $title ?>" size=35></td>
  <tr valign=top>
    <font face=verdana size=2>Story:</font></td>
    <textarea name="body" ROWS=10 COLS=65 WRAP=on><?php echo $body ?></textarea></td>
    <input type="Submit" name="submit" value="Enter Information"></td>


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]

Reply via email to