This tutorial will show you how to create a affiliation script, in which has an admin panel where you can manage your affiliates and more!
1) Create a new database and run this query through phpmyadmin or what ever manager you have in the database created.
CODE
CREATE TABLE affiliates (
id int(11) NOT NULL auto_increment,
views smallint(3) NOT NULL,
name TEXT NOT NULL default '',
link TEXT NOT NULL default '',
image TEXT NOT NULL default '',
PRIMARY KEY (id),
KEY id (id)
) TYPE=MyISAM;
2) Next, create a file called
db.php and all the following code in there. Replace with correct information
CODE
<?php
$username = "USERNAME";
$password = "PASSWORD";
$host = "localhost"; //usually local host
$database = "DATABASE";
mysql_connect($host,$username,$password) or die("Error connecting to Database! Please Try again.
" . mysql_error()); mysql_select_db($database) or die("Cannot select database! Please Try again.
" . mysql_error());
?>