<?php
if (isset($_POST['Submit'])) {
$email = mysql_real_escape_string($dbc, trim($_POST['email']));
$dbc = mysql_connect('localhost', 'root', 'root')
or die('Failed to connect to MYSQL Server');
mysql_select_db("test", $dbc);
$query = "INSERT INTO download (email) VALUES ('$email')";
$result = mysql_query($query, $dbc)
or die (mysql_error($dbc));
mysql_close($dbc);
}
?>
|