summaryrefslogtreecommitdiff
path: root/register.php
blob: f819b19cbb162ffefd1307da564262fe5494439d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<?php
$db_handle = pg_connect("host=localhost dbname=project user=postgres");
$query = "insert into emails(email) values ('$_POST[email]')";
$result = pg_query($db_handle, $query);
if ($result) {
    echo 'Registered successfully.';
}
else {
    echo 'Already registered.<br>If you are sure this is not the case then please contact the site administrator immediately.';
}
pg_close($db_handle);
?>