Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

64 users online



$10 paypal if you can make this for me EASY!

$10 paypal if you can make this for me EASY!

Currently viewing this thread: 1 (0 members and 1 guests)


dexter

dexter

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?

dexter

dexter

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

dexter

dexter

Neverside Newbie
Status: Offline!

noone?

BigToach

BigToach

Neversidian
Status: Offline!
PHP:

<?php

function add_email($email$file 'emails.txt')
{
    
$array unserialize(file_get_contents($file));
    
$array[] = addslashes($email);
    
$fp fopen($file'w');
    
fwrite($fpserialize($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!

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0177 seconds.