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
What is a http session?
Which is not a file-related function in php?
Will react hooks replace redux?
What is the difference between require_once and require in php?
What is difference Between PHP 5 and 7?
What is php array function?
How to include a file code in different files in php?
Why json is used in php?
How does php server work?
What is the difference between null and empty?
Difference between $message vs. $$Message in php.
What are global variables in php?
What is php used for?
What is the function file_get_contents() usefull for?
What are the string function in php?