Re: Cant get this one
| From: | Chris Lee | Date: | Thu, 01 Feb 2001 17:12:56 +0000 |
| Subject: | Re: Cant get this one | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37663@lists.php.net to get a copy of this message | ||
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
lee@mediawaveonline.com
""Mike"" <mpeloso@princeton.edu> wrote in message
news:95c33h$5a3$1@toye.p.sourceforge.net...
> 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
> mpeloso@princeton.edu
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>