Пример #1
0
<html>
	<head><title>Listagem de Editoras</title></head>
	<body>
	
		
	
		<table border ='1'>
		
		
		
		
		
		
			<?php 
$editoraBDR = new ColecaoDeEditorasEmBDR($pdo);
$colecao = $editoraBDR->todos();
echo "<tr>" . "<td colspan='3' >Tamano da Lista: " . $editoraBDR->tamanho() . "</td>" . "</tr>";
?>
			
			
			
			
			
		
			<tr>
				<th>ID</th>
				<th>Nome</th>
			</tr>
			
			
			
Пример #2
0
?>
' /><br />
				<label for="ano">Ano: </label>
				<input type="text" id="ano" name="ano" value='<?php 
echo $revista->ano();
?>
' /><br />
				<label for="editora">Editora: </label>
				<select id="editora" name="editora">
				
				
				
				
				
				<?php 
foreach ($editoraBDR->todos() as $e) {
    if ($e->nome() == $revistaBDR->comId($id)->editora()->nome()) {
        echo "<option selected='selected' value=" . $e->id() . " >" . $e->nome() . "</option>";
    } else {
        echo "<option value=" . $e->id() . " >" . $e->nome() . "</option>";
    }
}
?>
				
				
				
				
				
				
				</select>
				<input type="submit" id="enviar" name="enviar" value="Salvar"/><br />