I am using twitter Bootstrap for UI to display the links in the code in the form of table But it's not actually being displayed in the table. Please find the error.
<center> <div class="well well-large"> <table>
<?php
require "config.php";
require "course_availability_file.php";
//require "database_queries.php";
//require "webcrawler.php";
$course_selected = strtolower( $_POST['coursename1']);
$available = course_availability($course_selected);
if ( $available == 0){
echo "Invalid course"."</br>";
}
else {
// echo "Valid course"."</br>";
//echo "List of training links for the course ".$course_selected ."</br>";
function retrieveFromDatabase($course_selected){
require "config.php";
$con = mysql_connect($db_host,$db_user ,$db_pass);
if (!$con){
die('Could not connect: ' . mysql_error());
}
mysql_select_db($db_name, $con);
$sql_retrieve = "SELECT DISTINCT course_link from course where course_name = '".$course_selected."' AND number < 5 ;";
$result = mysql_query( $sql_retrieve);
while($row = mysql_fetch_array($result))
{
echo '<tr>';
$link = $row['course_link'];
echo '<a href="' . $link. '"> ' .$link.' </a>'."</br>";
echo '</tr>';
}
$check_num_rows = mysql_num_rows($result);
mysql_close($con);
return $check_num_rows;
}
retrieveFromDatabase($course_selected);
}
?> </table></div> </center>
I'm trying to find out where the error is. All I want to display my links in a table.