Hello
I want to run a contest on my website and i am asking visitors to post their names and BTC addresses and i’ll use random.org’s list randomizer to pick one from the list
what i did so far:
[embed=425,349[php]]<?php
if ($_POST) {
$name = $_POST[‘commentName’];
$txt = $_POST[‘commentBTC’];
$handle = fopen(“comments.html”,“a”);
fwrite($handle, “” . $name . " : " . $txt . “
”);
fclose($handle);
}
?>
[/php]
and
[php]
Some Name:
BTC Address:
[/php]
so i get a html list, which is great. the problem is that some visitors are signing up multiple times
is there a way to check ‘comments.html’ for ‘commentBTC’ and if exists, to deny signing up?
i can drop the ‘commentName’ field if it’s easier to have only a bitcoin address list.
help? thank you!