[eluser]Thorpe Obazee[/eluser]
[quote author="yudahebat" date="1245237379"]I have change my views into
Code:
<table width="645" border="0" cellpadding="0" cellspacing="0" class="tabel" >
<tr>
<td width="130" class="tabel" align="center"><p>Car Type</p></td>
<td width="110" class="tabel" align="center"><p>Rent date</p></td>
<td width="110" class="tabel" align="center"><p>Return date</p></td>
<td width="80" class="tabel" align="center"><p>Duration</p></td>
<td width="100" class="tabel" align="center"><p>Price/day</p></td>
<td width="110" class="tabel" align="center"><p>Suhtotal</p></td>
</tr>
<?php $i = 1; ?>
<tr>
<td width="130" class="tabel"><p><?= $this->session->userdata($i.'nama');?></p></td>
<td width="110" class="tabel"><p>
<?php $data = array( 'name' => 'renttgl',
'id' => 'renttgl',
'value' => '',
'style' => 'width:70%',
'class' => 'w16em dateformat-Y-ds-m-ds-d',
);
echo form_input($data);?></p></td>
<td width="110" class="tabel"><p>
<?php $data = array( 'name' => 'rettgl',
'id' => 'rettgl',
'value' => '',
'style' => 'width:70%',
'class' => 'w16em dateformat-Y-ds-m-ds-d',
);
echo form_input($data);?></p></td>
<td width="80" class="tabel"><p>..day</p></td>
<td width="100" class="tabel"><p>$ <?= $this->session->userdata($i.'harga');?></p></td>
<td width="110" class="tabel"><p>$..</p></td>
</tr>
<?php $i++; ?>
<tr>
<td colspan="4" class="tabel2"><p><?php echo form_submit('', 'send request'); ?></p></td>
<td class="tabel2"><p>Total</p></td>
<td class="tabel2"><p>$...</p></td>
</tr>
</table>
and my controller
Code:
function v_cart()
{
$data['css'] = $this->css;
$data['css2'] = $this->css2;
$data['base'] = $this->base;
$data['menu_web'] = $this->menu;
$data['myrobots'] = '<meta name="robots" content="noindex,nofollow">';
$data['mywebtitle'] = 'mrputucar | Your cart';
$this->output->enable_profiler(TRUE);
$this->session->set_userdata(array('id' => $this->input->post('id'),'nama' => $this->input->post('nama'),'photo' => $this->input->post('photo'),'harga' => $this->input->post('harga')));
$this->load->view('v_cart',$data);
}
but the
Code:
<?= $this->session->userdata($i.'nama');?
and
Code:
<?= $this->session->userdata($i.'harga');?
won't show. whats wrong??[/quote]
I honestly don't understand how that would work.
Code:
<?= $this->session->userdata($i.'nama');?
is non-existent so you'll just get (bool) FALSE.
PS. Are you for real?