Re: [PHP-DB] Re: Generating readio buttons

2002-11-04 Thread Peter Beckman
On Sun, 3 Nov 2002, David Jackson wrote:

 OK, this works but there has to be a pretty way?

 David

html
headtitleOperation Sticky Bun/title/head
body
h3 align=centerOperation 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 BeckmanSystems Engineer, Fairfax Cable Access Corporation
[EMAIL PROTECTED] http://www.purplecow.com/
---


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




[PHP-DB] Re: Generating readio buttons

2002-11-03 Thread David Jackson
OK, this works but there has to be a pretty way?

David

- Works -

html
headtitleOperation Sticky Bun/title/head
body
h3 align=centerOperation Sticky Bun /h3
?php require('connect.php'); ?
?php
print 'form action=hello.php method=post';
$header = mysql_query (SELECT * FROM chart
   ORDER BY acct );
if ($row = mysql_fetch_array($header)) {
do {
   print 'input type=radio name=ledger_acct value=';
   print $row[acct];print '';
   print $row[descript];print 'br';
   } while($row = mysql_fetch_array($header));

} else {print Sorry, no records were found!;}

print '/form';
?
/body
/html





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