Here is the script. It is not connecting to the database. The config file has all the details of db name, user, password etc. I don't know why this is not working. Any help greatly appreciated. I am desperate to find a solution. Thanks for your patience.
<BODY>
<?php
require 'config.php';
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$emailaddress = $_POST['emailaddress'];
$webtitle = $_POST['webtitle'];
$weburl = $_POST['weburl'];
$webdescription = $_POST['webdescription'];
$dateofentry = $_POST['dateofentry'];
// Establish a MySQL connection and select our database using values contained in config.php.
mysql_connect(DB_HOST, DB_USER, DB_PASS);
mysql_select_db(DB_NAME);
mysql_query('SELECT * FROM `Relatedlinks`');
/*
mysql_query('INSERT INTO `Relatedlinks` (`firstname`, `lastname`, `webemail`, `weburl`, `webtitle`, `webdescription`, `date`) VALUES (\'' . $firstname . ', ' . $lastname . ', ' . $emailaddress . ', ' . $weburl . ', ' . $webtitle . ', ' . $webdescription . ', ' . $dateofentry . ')') or die(mysql_error());
*/
?>
</BODY>
