PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
[s]Hei[/s] Hey [s]frnds[/s] friends.. am a new user in this forum.. i am new php programmer. i need to show the values in a table in the webpage which are taken from the database. what is the PHP code for this. please anyone help me.. am a new php programmer. studied php [s]frm[/s] from internet so [s]plz[/s] please anyone help me....
[s]Lov[/s] Love [s]nd[/s] and [s]Pryr[/s] prayer
a v vishnu
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.
Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
i need to know the code for showing the values of tables in the webpage wchich are selected from the database. if there are 3 row , 3 cloumn of data in the database, i need to show the 3 row 3 cloumn values inside a table in the webpage. i think for that need dyanamic display code is needed. so please anyone help me. i dont no much about php.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hai.. friends... am not looking for the exact code.. i need some helps from you people..
i tried the code
<html>
<head><title>Display Table</title></head>
<body>
<?php
$database="temp"; /* DB name */
$host="localhost";
$user="root"; /* Set DB Username */
$pass=""; /* Set DB password*/
mysql_pconnect($host,$user,$pass); /* DB connect....*/
mysql_connect ($host,$user,$pass);
@mysql_select_db($database) or die( "Unable to select database");
$result = mysql_query( "SELECT Username,Primaryid FROM registration" )
or die("SELECT Error: ".mysql_error());
$num_rows = mysql_num_rows($result);
//print "There are $num_rows records.<P>";
print "<table width=500 border=1>\n";
while ($get_info = mysql_fetch_row($result)){
print "<tr>\n";
foreach ($get_info as $field)
print "\t<td><font face=Copperplate Gothic size=4/>$field</font></td>\n";
print "</tr>\n";
}
print "</table>\n";
?>
</body>
</html>
i need to display the table in the exact postion in the webpage. for that what i need to add.
and also i need to give some different colours for the border and rows
please help me...!!
Any assistance is much appreciated.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]