Results 1 to 2 of 2

Thread: Selecting a list using php

  1. #1
    Join Date
    Aug 2011
    Location
    Rep Of Ireland
    Posts
    126
    Thanks
    24
    Thanked 3 Times in 1 Post

    Default Selecting a list using php

    Emails being saved to a list using the php below. There is however a gap being created at the top of the list as the attached image demonstrates. Attachment 4272

    Why will the saved emails not start at the top of the field?

    PHP Code:
    <?php

        $List  
    $_POST['List'];
        
    $Email $_POST['Email'];

        if (
    file_exists("data/$List")) {
            
    $myfile file("data/$List");
            
    $fh fopen("data/$List""w");
            for (
    $index 0$index count($myfile); $index++) {
                if (
    $Email != rtrim($myfile[$index])) {
                    
    fputs($fh$myfile[$index]);
                }
            }
            
    fputs($fh$Email "\n");
            
    fclose($fh);
        } else {
            
    $myfile fopen("data/$List""w");
            
    fputs($myfile$Email "\n");
            
    fclose($myfile);
        }

    ?>
    Last edited by Webiter; 01-14-2012 at 09:37 AM. Reason: shorter question

  2. #2
    Join Date
    Oct 2008
    Posts
    60
    Thanks
    2
    Thanked 7 Times in 7 Posts

    Default

    post your HTML code too

Tags for this Thread

Bookmarks

Posting Permissions

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