My code below has always worked for me, try:
<?php
$host = 'localhost';
$user = 'dbuser';
$pass = 'dbpass';
$db = 'dbname';
mysql_connect($host, $user, $pass);
mysql_select_db($db);
function dbentry($FullName, $EMailAddress, $Location, $WebsiteName, $WebsiteURL, $DownloadedScript, $ScriptUpdates, $Referer, $Comments, $DateTime, $IP, $BrowserOS) {
global $link;
$query = "INSERT into php_scripts_dl (FullName, EMailAddress, Location, WebsiteName, WebsiteURL, DownloadedScript, ScriptUpdates, Referer, Comments, DateTime, IP, BrowserOS) VALUES('$FullName', '$EMailAddress', '$Location', '$WebsiteName', '$WebsiteURL', '$DownloadedScript', '$ScriptUpdates', '$Referer', '$Comments', '$DateTime', '$IP', '$BrowserOS')";
$result = mysql_query($query) or die("Could not insert data into database. MySQL Said: " . mysql_error());
return true;
}
{
dbentry($_POST["FullName"], $_POST["EMailAddress"], $_POST["Location"], $_POST["WebsiteName"], $_POST["WebsiteURL"], $_POST["DownloadedScript"], $_POST["ScriptUpdates"], $_POST["Referer"], $_POST["Comments"], $_POST["DateTime"], $_POST["IP"], $_POST["BrowserOS"]);
}
?>
you will need to change alot of the stuff to fit your own config etc etc. but the code itself works 😉 HTH