示例#1
0
文件: header.php 项目: solostyle/iam
        <div id="blogAddForm">

            <h2 id="addAnEntry">Add an Entry</h2>
            <div id="addForm">
                <div class="main">
                    <p><input type="text" value="title" id="addFormTitle"/></p>
                    <p><textarea id="addFormEntry">entry</textarea></p>
                </div><!-- end .main -->

                <div class="info">

                    <!-- the category of the entry, radio buttons -->   
                    <ul>
                        <?php 
    select_db();
    $cats = rtrv_categories();
    mysql_close();
    foreach ($cats as $cat) {
        ?>
                            <li><input type="radio" name="category" id="addFormCategory_<?php 
        echo $cat;
        ?>
" value="<?php 
        echo $cat;
        ?>
" /><?php 
        echo $cat;
        ?>
</li>
                        <?php 
    }
示例#2
0
function list_categories() {
	$result = rtrv_categories();
	$content = '<p>';
	while ($cat_nm = mysql_fetch_array($result)) {
		$content .= '<input type="radio" name="cat" value="' . $cat_nm[0] . '">';
		$content .= $cat_nm[0] . '<br />'; 
	}
	$content .= '</p>';
	return $content;	
}