Sorry m8 i am a total newbie to php+html,
I dont get these problems with PHP+Flash

Here is the code i am using to return the edit page with the data.

$result = mysql_query("SELECT * FROM $tablename WHERE id= $id")or
die("<br>ther was an error<br>
                   tablename:= $tablename<br>
                   row id:= $id");


if ($myrow = mysql_fetch_array($result)) {
  echo "<form method='post' action='edit3.php?tablename=$tablename'>\n";
  do {
    printf("<input type='hidden' name='id' value=%s>
 Artist <br><input type='text' name='artist' size=25 maxlength=25
value=%s><br>
 Title <br><input type='text' name='title' size=25 maxlength=25
value=%s><br>
 Picture <br><input type='text' name='picture' size=25 maxlength=25
value=%s><br>
 Review  <br><textarea name='review' cols=30 rows=5>%s</textarea><br>
 Label<br><input type='text' name='label' size=25 maxlength=25 value=%s><br>
 Format <br><input type='text' name='format' size=25 maxlength=25
value=%s><br>
 Price <br><input type='text' name='price' size=10 maxlength=8 value=%s><br>
 Rating <br><input type='text' name='rating' size=10 maxlength=8
value=%s><br>\n",
 $myrow["id"],
 $artist=$myrow["artist"],
 $title=$myrow["title"],
 $picture=$myrow["picture"],
 $review=$myrow["review"],
 $lable=$myrow["label"],
 $format=$myrow["format"],
 $price=$myrow["price"],
 $rating=$myrow["rating"]);
  } while ($myrow = mysql_fetch_array($result));
 echo "<br><input type='submit' value='Submit' name='submit'>";
echo "<input type='reset' value='Reset' name='reset'></form>\n";
}

Cheers

Paul

"Bas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "Paul Ferrie" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hello again guys
> >
> >    This week i have been on here and  made a few posts regarding a small
> > admin site app
> > http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html
> >
> > Most of it is now working thank god, but still have have problems fully
> > populating the textfields when i go to edit a record.
> > Only one of the fields fully populates with the data returned from the
> > $query
> > If i view the source file via the broswer(right click / view source) i
can
> > see that the data has been sent ok
> > <input type='text' name='format' size=25 maxlength=25 value=cd format>
> > But all i see is "cd"
> > Anyone
> >
> > cheers
> >
> > Paul
>
> Try to do it in double quotes(the query-data)
> In an echo statement, there you must escape the double quotes.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to