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 the use of mysql_real_escape_string() function?
What is php compared to html?
How do functions work?
What is the difference between echo print and print_r in php?
What does the expression exception::__tostring means?
Explain the difference between static and dynamic websites?
What are the php functions?
What is the meaning of "enctype= multipart/form-data" ?
Explain me what is sql injection?
What does $_server mean?
What is the integer?
What is the default time of cookie in php?
How to download files from an external server with code in php?
Is null or empty c#?
How to get no of arguments passed to a PHP Function?