Welcome Guest, Not a member yet? Register   Sign In
example add / edit / delete app
#3

[eluser]Future Webs[/eluser]
View - List

Code:
<p>&lt;?php echo anchor('/example/form/' , 'Add New Example'); ?&gt;</p>
<table width="100%" border="1" cellspacing="2" cellpadding="4" class="AdminTable">
  <tr class="AdminTableHeader">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>Id</td>
    <td>Text</td>
    <td>Radio</td>
    <td>Checkbox</td>
    <td>Drop menu</td>
    <td>Date Added</td>
    <td>Date Updated</td>
  </tr>
&lt;?php foreach ($rs_examples as $row_rs_examples) : ?&gt;  
  <tr>
    <td>&lt;?php echo anchor('/example/form/'.$row_rs_examples->example_id , 'Edit'); ?&gt;</td>
    <td>&lt;?php echo anchor('/example/delete_example/'.$row_rs_examples->example_id, 'Delete' );  ?&gt;</td>
    <td>&lt;?php echo $row_rs_examples->example_id ; ?&gt;</td>
    <td>&lt;?php echo $row_rs_examples->example_text ; ?&gt;</td>
    <td>&lt;?php echo $row_rs_examples->example_radio ; ?&gt;</td>
    <td>&lt;?php echo $row_rs_examples->example_checkbox ; ?&gt;</td>
    <td>&lt;?php echo $row_rs_examples->example_dropmenu ; ?&gt;</td>
    <td>&lt;?php echo $row_rs_examples->example_date_added ; ?&gt;</td>
    <td>&lt;?php echo $row_rs_examples->example_date_updated ; ?&gt;</td>
  </tr>
&lt;?php endforeach ; ?&gt;
</table>

<pre>
&lt;?php print_r($rs_examples) ; ?&gt;
</pre>

Demo Sql

Code:
--
-- Table structure for table `examples`
--

CREATE TABLE IF NOT EXISTS `examples` (
  `example_id` int(10) NOT NULL auto_increment,
  `example_text` varchar(50) NOT NULL,
  `example_radio` int(5) NOT NULL,
  `example_checkbox` int(5) NOT NULL,
  `example_dropmenu` varchar(25) NOT NULL,
  `example_date_added` datetime NOT NULL,
  `example_date_updated` datetime NOT NULL,
  KEY `example_id` (`example_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;

--
-- Dumping data for table `examples`
--

INSERT INTO `examples` (`example_id`, `example_text`, `example_radio`, `example_checkbox`, `example_dropmenu`, `example_date_added`, `example_date_updated`) VALUES
(1, 'First Example', 1, 0, '1', '2008-11-18 00:00:00', '2008-11-19 01:20:13'),
(2, 'Second Example', 0, 1, '2', '2008-11-18 00:00:00', '2008-11-19 01:22:47'),
(3, 'Third Example', 1, 0, '3', '2008-11-18 00:00:00', '2008-11-19 01:20:17'),
(4, 'Fourth Example', 1, 1, '4', '2008-12-10 00:00:00', '2008-11-19 01:26:05');

-- --------------------------------------------------------

--
-- Table structure for table `example_cats`
--

CREATE TABLE IF NOT EXISTS `example_cats` (
  `example_cat_id` int(10) NOT NULL auto_increment,
  `example_cat_name` varchar(25) NOT NULL,
  PRIMARY KEY  (`example_cat_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `example_cats`
--

INSERT INTO `example_cats` (`example_cat_id`, `example_cat_name`) VALUES
(1, 'First Category'),
(2, 'Second Category'),
(3, 'Third Category'),
(4, 'Fourth Category');

Continued in next post ...


Messages In This Thread
example add / edit / delete app - by El Forum - 11-19-2008, 05:05 PM
example add / edit / delete app - by El Forum - 11-19-2008, 05:06 PM
example add / edit / delete app - by El Forum - 11-19-2008, 05:08 PM
example add / edit / delete app - by El Forum - 11-19-2008, 05:09 PM
example add / edit / delete app - by El Forum - 11-19-2008, 06:53 PM
example add / edit / delete app - by El Forum - 11-19-2008, 07:09 PM
example add / edit / delete app - by El Forum - 11-19-2008, 07:14 PM
example add / edit / delete app - by El Forum - 11-19-2008, 07:24 PM
example add / edit / delete app - by El Forum - 12-10-2008, 03:31 PM
example add / edit / delete app - by El Forum - 12-10-2008, 03:37 PM
example add / edit / delete app - by El Forum - 12-10-2008, 04:30 PM
example add / edit / delete app - by El Forum - 12-10-2008, 04:35 PM
example add / edit / delete app - by El Forum - 12-11-2008, 03:12 AM
example add / edit / delete app - by El Forum - 12-11-2008, 03:13 AM
example add / edit / delete app - by El Forum - 03-02-2009, 01:30 PM
example add / edit / delete app - by El Forum - 03-03-2009, 08:44 AM
example add / edit / delete app - by El Forum - 03-05-2009, 01:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB