NEED to add a column to database generated table |
[eluser]Ram2810[/eluser]
Hi everyone I got stuck with this table generation code. I generated a table of data generated from database ,now i need to add a column in the end with a link tag to edit the row,i need to get the this edit link auto generate as the rows of data increase. Can anyone help please Thank you
[eluser]pistolPete[/eluser]
Post the view, model and controller code you have by now.
[eluser]Ram2810[/eluser]
VIEW PAGE -------------------------------------------------------------------- Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ---------------------------------------------------------- MODEL PAGE ----------------------------------------------------------- Code: <?php ------------------------------------------------------- CONTROLLER PAGE --------------------------------------------------------- Code: <?php ---------------------------------------------------- These are the pages i worked ............ hope some one corrects me thank you
[eluser]pistolPete[/eluser]
Please use [ code ] tags in future posts! I wouldn't use the table class but generate the table manually: Controller: Code: <?php Model: Code: <?php View: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
[eluser]Dam1an[/eluser]
[quote author="pistolPete" date="1240703934"]I wouldn't use the table class but generate the table manually[/quote] Or, if you insist on using the table class, then use th add_row fuction You should also do all the table inititialisation in the controller, not the view |
Welcome Guest, Not a member yet? Register Sign In |