I have a links database... when you click on a link, it goes to links2.php?id=(whatever link id it is) where it updates the number of hits... how do I then redirect a visitor to the url, which is row #2
<?php
// connect to mysql database
$db = mysql_connect("localhost","jointops_site","pw");
mysql_select_db (jointops_site);
// Ask the database for the information from the dl's table
$query = "UPDATE links SET hits = hits + 1 WHERE id='" . $_GET['id'] . "'";
$result = mysql_query($query) or die(mysql_error());
// send the file (hopefully you knows how to do this...)
echo "<a href= '$rows[2]' target= '_new'>If you are now redirected, click here...</a><br>";
echo "<meta http-equiv= 'refresh' content= '0; url= $rows[2]'>";
?>
echo "<meta http-equiv= 'refresh' content= '0; url= $rows[2]'>"; does not work at all... pls help