[PHP] Displaying MySQL data inside of a table

2003-07-28 Thread SP Computing
Hi all, I have this code so far: ? mysql_connect(localhost, USER, PASS); mysql_select_db(DB); $result = mysql_query(SELECT * FROM tbl); ? Inside one of my tables, I have one field called IP which contains just over a thousand IP addresses. I would like these IP addresses to be displayed

Re: [PHP] Displaying MySQL data inside of a table

2003-07-28 Thread Jacob Vennervald Madsen
Hi Next time you can find a lot of information about this on www.php.net. Check out this example: ?php $conn = mysql_connect(localhost, mysql_user, mysql_password); if (!$conn) { echo Unable to connect to DB: . mysql_error(); exit; } if

Re: [PHP] Displaying MySQL data inside of a table

2003-07-28 Thread desa15
$mysql_link = mysql_connect(localhost, USER, PASS); mysql_select_db(DB, $mysql_link); $SQL = SELECT * FROM tbl; $result = mysql_query($SQL, $mysql_link) or die (mysql_error()); echo table border=1 cellpadding=5; while($resultat = @mysql_fetch_array($result)) { echo trtd

Re: [PHP] Displaying MySQL data inside of a table

2003-07-28 Thread sven
[EMAIL PROTECTED] wrote: $mysql_link = mysql_connect(localhost, USER, PASS); mysql_select_db(DB, $mysql_link); $SQL = SELECT * FROM tbl; $result = mysql_query($SQL, $mysql_link) or die (mysql_error()); echo table border=1 cellpadding=5; while($resultat =

Re: [PHP] Displaying MySQL data inside of a table

2003-07-28 Thread desa15
[EMAIL PROTECTED] wrote: $mysql_link = mysql_connect(localhost, USER, PASS); mysql_select_db(DB, $mysql_link); $SQL = SELECT * FROM tbl; $result = mysql_query($SQL, $mysql_link) or die (mysql_error()); echo table border=1 cellpadding=5; while($resultat =