Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1

Thread: email dropdown

  1. #1
    New Coder
    Join Date
    Nov 2010
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    email dropdown

    hey guys, I need some help here..

    I'm trying to create a an email you select from a dropdown menu..

    heres how it goes...

    you create a form that has a input box and a button labelled "add" and a button labelled "display" and a button labelled "email"
    the user then enters an email address into the input box.
    When the button labelled "add" is pressed a php file is called to
    add that email address to a text file call addresses in your folder on the server.
    When the button labelled "display" is pressed a php file is called to display the contents of addresses

    When the button labelled "email" is pressed a php file is called.
    That php file will display
    the email addresses of the text file in a drop down list
    a text box for subject
    and a textarea for a message
    and a submit button
    When the submit button is pressed a php file will be called to
    email the message in the textarea
    with the entered subject as the subject of the email
    to the selected email address

    heres my code...

    Code:
    form action="uploader.php" method="post" enctype="multipart/form-data">
    
    <input type="submit" value="Add" /> 
    </form>
    <input type="text" name="email">
    <input type="button" value="display"> <input type="submit" value="email" />

    PHP Code:

    PHP Code:
    echo $_FILES["uploadfile"]["name"];
    $junk=$target_path.basename($_FILES["uploadfile"]["name"]);
    if(
    move_uploaded_file($_FILES["uploadfile"]["tmp_name"],$junk)){

    $dirstuff=opendir($test);
    while (
    $jim_bob=readdir($dirstuff)){
    echo (
    "$jim_bob<br />");
    }
    closedir($dirstuff);


    echo 
    "moved ok";
    }
    else {
    echo 
    "error moving file";
    }
    ?> 
    I cant figure out how to set this up.. The add button seems to work though!
    I am no expert as I am still learning php so all the help and guide is appreciated!

    EDIT: sorry guys, this is supposed to be in PHP...
    Last edited by d1lu5ion; 10-27-2011 at 06:45 AM. Reason: Wrong thread please move this. to php.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •