How to get tabels from database in php andd display it in
the table form using codelgniter?
plz help me
Answer Posted / amit srivastava
require "config.php"; //for connection with database
$query2=" SELECT * FROM tablename";
$result2=mysql_query($query2);
echo mysql_error();
$nume=mysql_num_rows($result2);
$bgcolor="#f1f1f1";
echo "<TABLE width=50% align=center cellpadding=2
cellspacing=2> <tr>";
echo "<td bgcolor='dfdfdf' > <font
face='arial,verdana,helvetica'
color='#000000'>value1</font></td>";
echo "<td bgcolor='dfdfdf' > <font
face='arial,verdana,helvetica'
color='#000000'>value2</font></td>";
echo "<td bgcolor='dfdfdf' > <font
face='arial,verdana,helvetica'
color='#000000'>value3</font></td>";
echo "<td bgcolor='dfdfdf' > <font
face='arial,verdana,helvetica'
color='#000000'>value4</font></td>";
echo "<td bgcolor='dfdfdf'> <font
face='arial,verdana,helvetica'
color='#000000'>value5</font></td></tr>";
| Is This Answer Correct ? | 4 Yes | 5 No |
Post New Answer View All Answers
How to remove values saved in the current session?
What is strcmp () in php?
Which is used to maintain the value of a variable over different pages?
How big is nvarchar max?
How can we upload a file in php?
What is htmlentities function in php?
Is laravel an oop?
How to redirect a url from http to https in .htaccess?
What is the purpose of the '.frm' file extension? What do thes file contain?
What is the output of the following php code?
How does php work with apache?
What is boolean in php?
What is substr() in php? And how it is used?
Tell me how would you declare a function that receives one parameter name hello?
what are interfaces and Abstart classes