Hi, I need to solve the following problem: duplicate entries!
It's for a form / script that allow users to fill-in their name,adress, education, ....and upload their resume. Because I don't want to open the whole text-database (kind of a modified add.cgi of Links 2.0) for speed and security I'm looking for a different approach. Actually I was thinking of the following, and would like to receive some comments/suggestions: (Maybe there is a better and easier way! Only I didn't see during my searches.)
Convert the whole "%in" to a string or digit, store this digit in a text-file or as a cookie and check this information wehen processing the form.
....the problem is: I don't know if its possible to convert %in into a unique string or digit and how to do it.
Something like........
# Calculate unique string..
$string = &calculate_string(%in);
# Check for a stored string
$saved = new CGI;
$cookie = $saved->cookie('form_name');
# Let's compare the two strings.
if ($string ne $cookie) { $valid = 1; }
$valid or &site_html_request_duplicate and return;
It's for a form / script that allow users to fill-in their name,adress, education, ....and upload their resume. Because I don't want to open the whole text-database (kind of a modified add.cgi of Links 2.0) for speed and security I'm looking for a different approach. Actually I was thinking of the following, and would like to receive some comments/suggestions: (Maybe there is a better and easier way! Only I didn't see during my searches.)
Convert the whole "%in" to a string or digit, store this digit in a text-file or as a cookie and check this information wehen processing the form.
....the problem is: I don't know if its possible to convert %in into a unique string or digit and how to do it.
Something like........
Code:
# Calculate unique string..
$string = &calculate_string(%in);
# Check for a stored string
$saved = new CGI;
$cookie = $saved->cookie('form_name');
# Let's compare the two strings.
if ($string ne $cookie) { $valid = 1; }
$valid or &site_html_request_duplicate and return;
Code: