first of all your write you need to create a mysql db/table
then once you've done that, go find a php book and learn some code 😛
i'm joking, well i'm not you should find a book and do some work, also look here
out.php
<?
// first of all set up a connection with your db
$conn = mysql_connect("localhost", "username", "password");
$db = mysql("db_name", $conn);
// then for error trapping make sure id exist
if (!empty($_GET['id'])) {
// Select the info from the table using id as the identifier
$sql = "SELECT * FROM `table_name` WHERE `id`='".$_GET['id']."'";
$qry = mysql_query($sql, $conn) or die(mysql_error());
if (mysql_num_rows($qry) == 1) {
// check to see if it exists
// get the array from the table to output it
$row = mysql_fetch_array($qry);
// update the number of hits for that id
$sql2 = "UPDATE `table_name` SET `hits`=`hits`+1 WHERE `id`='".$_GET['id']."'";
$qry2 = mysql_query($sql2, $conn) or die(mysql_error());
// redirect the browser to the page
Header('Location : '. $row['url']);
}
else {
echo "'ID' does not exist";
}
}
else {
echo "Please enter an 'ID'";
}
?>
note : this is probably the only time out of about a hundred you will get this much help from this site, as much as we like to help, you have to help yourself also by learning. so remember 😛
hope this helps anyway