works and alot simpler....

<?
  $result = mysql_db_query('some_db', "SELECT * FROM people");
 while ($r = mysql_fetch_array($result))
 {
  echo $r['name'];
 }
?>

--



Chris Lee
Mediawaveonline.com
[EMAIL PROTECTED]



""Mike"" <[EMAIL PROTECTED]> wrote in message
95c33h$5a3$[EMAIL PROTECTED]">news:95c33h$5a3$[EMAIL PROTECTED]...
> Im trying to create  an edit page for database records on the fly.I get
all
> the fieldnames and all the textboxes but only the first textbox has
data.the
> rest are always empty.any suggestions?
>
> for ($i =0;$i<mysql_num_fields($result);$i++)
> {
>
>  $row = mysql_fetch_row($result);
>  $name=mysql_field_name($result,$i);
>   echo "<p>$name<input type='text' value='$row[$i]' name='T1'
> size='20'></p>";
> }
>
>
> Thanks
> Mike P
> [EMAIL PROTECTED]
>
>
>
>
> --
> PHP General 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]
>



-- 
PHP General 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