Hi guys, I need your help. I have stored the information in mysql database where I can print it out in my php using with this following code: <?php session_start(); define('DB_HOST', 'localhost'); define('DB_USER', 'mydbusername'); define('DB_PASSWORD', 'mydbpassword'); define('DB_DATABASE', 'mydbname'); $errmsg_arr = array(); $errflag = false; $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } $db = mysql_select_db(DB_DATABASE); if(!$db) { die("Unable to select database"); } if($errflag) { $_SESSION['ERRMSG_ARR'] = $errmsg_arr; echo implode('<br />',$errmsg_arr); } else { $qrytable1="SELECT id, channels FROM tvguide"; $result1=mysql_query($qrytable1) or die('Error:<br />' . $qry . '<br />' . mysql_error()); while ($row = mysql_fetch_array($result1)) { echo "</br>"; echo "<td>".$row['channels']."</td>"; echo "</br>"; } } ?> PHP: Now I want to know how I can output the data from php to html, do you know how? if you do then i need your help. thanks in advance.
You already do that with your while loop. The lines you echo out ARE html Or do you mean something different?
Yeah that question doesn't make any sense, you're already doing it... though that data REALLY doesn't look tabular or belong in TD... much less the lack of logic to break it up... and the presence of the mysql_ functions they've been telling us for eight years to stop using and finally had to put a big red warning box up about that on every page of php.net...