View difference between Paste ID: 03q3ByEM and HQ6xsb7N
SHOW: | | - or go back to the newest paste.
1
<h1>CMS OTOMOTIF</h1>
2
<div id="body">
3
<h2>Hai <?php echo $this->session->userdata('username'); ?> ! <?php echo anchor('home/logout', 'Logout'); ?></h2>
4
<p>Halaman Sub Main Menu</p>
5
6
7
<br>
8
<div id="mainMenu">
9
	<?php echo anchor('catmenu/sub_mainmenus', 'Back'); ?>
10
</div>
11
<?php echo $message; ?>
12
<h2>Tambah Sub Menu</h2>
13
<div id="addMenuform">
14
	<form action="<?php echo site_url('catmenu/addMenusub_proses'); ?>" method="post">
15
	<strong>Nama Sub Menu </strong><br><input class="text" type="text" name="main_menu_sub_name"><br>
16
	<strong>Main Menu</strong><br>			
17
	<?php $options = array(
18
                  'small'  => 'Small Shirt',
19
                  'med'    => 'Medium Shirt',
20
                  'large'   => 'Large Shirt',
21
                  'xlarge' => 'Extra Large Shirt',
22
                );
23-
	
23+
/*
24
	formatnya itu:
25
	'val'=>'text yang tertulis' 
26-
	echo form_dropdown('shirts', $options, 'large'); ?>
26+
*/
27
$option2=array();
28
$r=$this->db->query($sql)->result_array();
29
foreach($r as $row)
30
{
31
	$option2[$row['id']]=$row['title'];
32
33
}
34
35
	$shirts_on_sale = array('small', 'large');
36
37
	echo form_dropdown('shirts', $option2, 'large'); ?>
38
<br>
39
<br>
40
	<strong>Link</strong><br><input class="text" type="text" name="main_menu_sub_link"><br>
41
	<input class='button1' type="submit" value="Save"/>
42
	<a class='button1' href="<?php echo site_url('catmenu/sub_mainmenus'); ?>">Cancel</a>
43
	</form>
44
</div>
45
46
</div>