I'm fairly new to PHP and I'm trying to create a simple database that gives the description and urls to articles I have put in my database. The problem is, when I put the column 'link' (with the resulting urls) between <a href> and </a>, the link is not yet specified. How can I change my code, so that it results in active links to other articles, instead of to my own search folder? Thank you in advance!

<h1>Search</h1>
<form method="post" action="Search2.php">
<input type="hidden" name="submitted" value="true" />

<label>Search Criteria: <input type="text" name="criteria" /></label>
 
<input type="submit" />

</form>

<?php 

if (isset($_POST['submitted'])) {
	

MySQL_connect("", "", ""); 
       MySQL_select_db(""); 

$criteria = $_POST['criteria'];
$query = "SELECT * FROM data WHERE MATCH(jaar, instelling, auteur, titel, tags, link) AGAINST('$criteria')";
$result = mysql_query($query) or die(mysql_error()) ; 										

echo "<table>"; 
echo "<tr><th>Jaar</th><th>Instelling</th><th>Auteur</th> <th>Titel</th><th>Link</th></tr>"; 

while($row=mysql_fetch_array($result)) {
	
	
	echo "<tr><td>";
	echo $row['jaar']; 
	echo "</td><td>";
	echo $row['instelling']; 
	echo "</td><td>";
	echo $row['auteur']; 
	echo "</td><td>";
	echo $row['titel']; 
	echo "</td><td>";
	echo  "<a href>" . $row['link'] . "</a>" ; 
	echo "</td></tr>";

}  


echo "</table>";
}
?>

Sorry made a big beginners mistake :$ Just made an error in the right code for a link. I'm very embarassed :) Sorry for waisting your time, this thread should be removed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.