steviez Posted December 26, 2007 Share Posted December 26, 2007 Hi, I have a database table full of banned IP addresses an i want to show them all on one page in a textarea How is this done? Thanks Link to comment https://forums.phpfreaks.com/topic/83270-solved-show-all-data-from-mysql-table/ Share on other sites More sharing options...
revraz Posted December 26, 2007 Share Posted December 26, 2007 Use a SQL statement to select them all, use a mysql_fetch statement to put them in a array, echo the array. Link to comment https://forums.phpfreaks.com/topic/83270-solved-show-all-data-from-mysql-table/#findComment-423592 Share on other sites More sharing options...
ohdang888 Posted December 26, 2007 Share Posted December 26, 2007 <?php mysql_connect("your server name, (most of the time, "localhost")", "username", "password") or die(mysql_error()); mysql_select_db("name of database of ip addresses") or die(mysql_error()); $result = mysql_query("SELECT * FROM name of table ip addressed are stored in ") or die(mysql_error()); while($row = mysql_fetch_array($result)){ echo $row[0]; echo '<br>'; } ?> Link to comment https://forums.phpfreaks.com/topic/83270-solved-show-all-data-from-mysql-table/#findComment-423594 Share on other sites More sharing options...
steviez Posted December 26, 2007 Author Share Posted December 26, 2007 thanks Link to comment https://forums.phpfreaks.com/topic/83270-solved-show-all-data-from-mysql-table/#findComment-423674 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.