Re: Reg. Dynamically populate a checkbox




thks for your reply,

but as you can see i used the 'checked' attribute, still i cant make
it. I knw tht i have done some mistake in the echo statement. as
follows,

echo "<tr>
<td Class='navText' align='center' class=$c>$event_id</td>
<td class='navText' class=$c>$event_name</td>
<td class='navText' align='center' class=$c><INPUT TYPE=CHECKBOX
NAME='publish' VALUE=1 <?php echo ($event_publish == 1 ? 'CHECKED' :
''); ?></td>
<td class='navText' align='center' class=$c><a
href='delete_event.php?event_id=$event_id'>$take_action</a></td></tr>";

kindly correct me...

thks

Mumia W. wrote:
On 08/29/2006 02:04 AM, calms wrote:
HI,

Hi


First of all im vry new to PHP, i like to retrieve a value from DB,
accordingly i like to display the checkbox, either checked or not.

Now im able to retrieve the value from DB, i can show even show the
checkbox, but i cant make it checked????
[...]

It's a good idea to learn HTML before learning PHP. HTML is a
complicated language with one purpose, and PHP is another
complicated language with a slightly different purpose.
Learning both at the same time can be overwhelming.

The "checked" attribute, in HTML, is used to make a checkbox
checked.

http://www.w3.org/TR/html4/interact/forms.html#checkbox

.



Relevant Pages

  • RE: If msgbox is yes then checkbox is checked?
    ... "Michael Stanbarger" wrote: ... For some reason i cant get this code to work. ... form, i want a checkbox to pop up to ask whether the data has been changed, ...
    (microsoft.public.access.formscoding)
  • Re: Biztalk 2004: HTML file output and "output escaping"
    ... I used the PassThru pipeline for the file port. ... Nothing in either of those should be escaping HTML. ... >> Matt, ... >> I cant believe how long I have been trying to get this to work. ...
    (microsoft.public.biztalk.general)
  • Re: Index Popup
    ... I tried the code amendment but I get an error on the if statement, ... If I run the excel program after saving with checkbox 1 unchecked, ... I cant though get this function to work when checking/un-checking the ... Set cbcCutomMenu1 = cbcCutomMenu.Controls.Add ...
    (microsoft.public.excel.programming)
  • RE: Option Button to display Text
    ... The code for using a checkbox would be the same as the code above with the ... I just have a simple question, but I cant seem to figure it out. ... letter template which I have created a userform through VBA to gather all the ... The only thing is I have an Option Button on the Userform that the User ...
    (microsoft.public.word.vba.general)
  • Re: IE add-onn shutdown
    ... >>> I scanned everything but cant seem to fix this problem. ... >>> Thks in advance ... > Protect your PC ...
    (microsoft.public.windows.inetexplorer.ie6.browser)