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
List some of the features of php7.
Where are sessions stored php?
Why laravel is best php framework?
Where php language is used?
How to support multiple-page forms?
What is a null coalescing operator in php7?
How does the identity operator === compare two values?
How to turn on the session support in php?
What does the unset() function means?
What is the purpose of the php empty function?
How to move uploaded files to permanent directory?
How can we know the total number of elements of Array?
What are the common uses of php?
Does php support multiple inheritances?
What is an operator in php?