
April 10th, 2006
10:47 AM
Neverside Newbie
Status: Offline!
$10 paypal if you can make this for me EASY!
I need a basic flat file script made for me.
I have a button on my website called "ADD ME"
then I have a form on my page called "Add me to the ADD ME button"
and they simply fill out the textbox and click submit.
I want when they click submit there ID to get inserted into the text document.
Then the "ADD ME" button to have a hyperlink thats randomized URL from the text document.
Possible?

April 10th, 2006
11:23 AM
Neverside Newbie
Status: Offline!
like insert your hotmail
they put me@hotmail.com
and another person can ave you@hotmail.com
then the button ranmoizes the URL from the list.
that makes more sense I think
:P

April 12th, 2006
10:45 AM
Neversidian
Status: Offline!
<?php
function add_email($email, $file = 'emails.txt')
{
$array = unserialize(file_get_contents($file));
$array[] = addslashes($email);
$fp = fopen($file, 'w');
fwrite($fp, serialize($array));
fclose($fp);
}
function get_email($file = 'emails.txt')
{
$array = unserialize(file_get_contents($file));
return $array[array_rand($array)];
}
?>
so then just make the form and insert the email address with add_email($_POST['email']);
and to display a random one do echo get_email();
Just a note, i didnt test any of this, but it should work
___________________
Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!