[php:1:d83d06ade9]<?php
// Input format: download.php?show=______&date=______
$hostname = \"localhost\";
$database = \"<database>\";
$username = \"<username>\";
$password = \"<password>\";
$table_name = \"geardownload\";
$connection = mysql_connect($hostname,$username,$password);
mysql_select_db($database,$connection);
if (isset($show) && isset($date)) {
if ($show == \"fifthgear\") {
echo \"You picked the show Fifth Gear and the episode from $date.<br />\";
$query = mysql_query(\"SELECT * FROM \'$table_name\' WHERE show=\'fifth\' AND date=\'$date\'\") or die(mysql_error());
$result = mysql_fetch_array($query);
echo $result[\'url\'];
}
elseif ($show == \"topgear\") {
echo \"You picked the show Top Gear and the episode from \".$date.\".<br />\";
}
else {
echo \"You picked an invalid show.<br />\";
echo \"<br />\";
echo \"<a href=\"http://5thgear.viper007bond.com/\">Return to the site.</a>\";
}
}
else {
echo \"You must specify both a show and an episode date.<br />\";
echo \"<br />\";
echo \"<a href=\"http://5thgear.viper007bond.com/\">Return to the site</a> to get a valid link.\";
}
?>[/php:1:d83d06ade9]
(No, I don\'t have \"&\" in my code, it\'s really \"&\".)
http://test.viper007bond.com/download.php?...date=2003-11-16
:?