Re: Variable from PHP to HTML...

From: Date: Wed, 13 Nov 2002 05:08:03 +0000
Subject: Re: Variable from PHP to HTML...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-23279@lists.php.net to get a copy of this message
If the last reply didn't help you, try this: <td><input name="<?php echo $sys; ?>" type="checkbox" value="name"><?php echo $sys; ?></td> Another way to write, if you aren't worried about <? being used by another processor: <td><input name="<?=$sys?>" type="checkbox" value="name"><?=$sys?></td> Peter On Tue, 12 Nov 2002, NIPP, SCOTT V (SBCSI) wrote: > I am attempting to create a form of system names that is populated > from a database query. The database query is working fine, and the form > > <form name="form1" method="post" action=""> > <table border="0" align="center"> > <?php do { > $sys = $system['Name']; > if ($cnt == 1) { > $cnt = 2; > echo "<tr>"; ?> > <td width="161"><input name="$sys" type="checkbox" > value="name"> > <?php echo $sys; ?></td> --------------------------------------------------------------------------- Peter Beckman Systems Engineer, Fairfax Cable Access Corporation beckman@purplecow.com http://www.purplecow.com/ ---------------------------------------------------------------------------

« previous php.db (#23279) next »