Hello,
When someone press this edit button, I expect that it carries me to call a certain database which is the particular data should be retrieve and show it in :
http://127.0.0.1/CompanyGiondaCI/index.p.../editpages
from:
http://127.0.0.1/CompanyGiondaCI/index.php/cpages/pages
I wonder who to transfer and pass the pages_id value to the next page?
Any clue? Thanks in advance.
views/pages.php
controllers/Cpages.php
When someone press this edit button, I expect that it carries me to call a certain database which is the particular data should be retrieve and show it in :
http://127.0.0.1/CompanyGiondaCI/index.p.../editpages
from:
http://127.0.0.1/CompanyGiondaCI/index.php/cpages/pages
I wonder who to transfer and pass the pages_id value to the next page?
Any clue? Thanks in advance.
views/pages.php
PHP Code:
<div class="row-fluid">
<div class="span12">
<button type="button" class="add" onclick="location.href='<?php echo site_url('cpages/addpages'); ?>';">ADD PAGES</button>
<div class="widget-box">
<div class="widget-title"><h5>Administrator</h5></div>
<div class="widget-content">
<table border="0" style="width: 100%; height: 90px;">
<tr>
<td>PAGES NAME</td>
<td>CREATE DATE</td>
<td>ORDER</td>
<td>CONTENT</td>
<td>EDIT</td>
<td>DELETE</td>
</tr>
<?php foreach ($pages as $pages_item): ?>
<tr>
<td><?php echo $pages_item->pages_name; ?></td>
<td><?php echo $pages_item->create_date; ?></td>
<td><?php echo $pages_item->pages_order; ?></td>
<td><?php echo $pages_item->pages_content; ?></td>
<td><button type="button" class="edit" onclick="location.href='<?php echo site_url('cpages/editpages'); ?>';">EDIT</button></td>
<td><button type="button" class="delete" href="adminform.php">DELETE</button></td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
</div>
</div>
controllers/Cpages.php
PHP Code:
public function pages() {
$data['pages'] = $this->Mpages->call_pages();
$this->load->view('pages', $data);
}