|
Downloadif (!isset($_POST["name"])) { echo "TIMBER source files are available for download upon completion of this simple registration form. (Click here to download sample queries that TIMBER supports). "; } else { mysql_connect("localhost","timber","zKwTtBYw") or die("Unable to connect to MySQL server"); mysql_select_db("timberbugs") or die("Unable to select database"); $rows = mysql_query("SELECT EMAIL FROM downloads"); $id = mysql_num_rows($rows) + 1; //$version = "1.0"; $version = "2.1"; $date_time = date('Y-m-d h:i:s'); $insert = mysql_query("INSERT INTO downloads VALUES('" . $id . "','" . $_POST["name"] . "','" . $_POST["email"] . "','" . $_POST["designation"] . "','" . $_POST["institution"] . "','" . $date_time . "','" . $version . "')"); echo "
"; // mail($_POST["email"],"Registration Confirmation","Thank you for downloading TIMBER!\n\nPlease contact us (timber@umich.edu) if you have any comments / questions."); } ?>
|