Re: Re: Generating readio buttons
| From: | Peter Beckman | Date: | Mon, 04 Nov 2002 15:07:38 +0000 |
| Subject: | Re: Re: Generating readio buttons | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-22969@lists.php.net to get a copy of this message | ||
On Sun, 3 Nov 2002, David Jackson wrote:
> OK, this works but there has to be a pretty way?
>
> David
<html>
<head><title>Operation Sticky Bun</title></head
<body>
<h3 align="center">Operation Sticky Bun </h3>
<?php
require('connect.php');
print '<form action="hello.php" method="post">';
$header = mysql_query ("SELECT * FROM chart ORDER BY acct");
if (mysql_num_rows($header)>0) {
while ($row = mysql_fetch_array($header)) {
print "<input type='radio' name='ledger_acct'
value='{$row['acct']}'>{$row['descript']}<br>";
}
} else print "Sorry, no records were found!";
print '</form>';
?>
</body>
</html>
That looks prettier to me.
Peter
---------------------------------------------------------------------------
Peter Beckman Systems Engineer, Fairfax Cable Access Corporation
beckman@purplecow.com http://www.purplecow.com/
---------------------------------------------------------------------------