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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help needed on Saving Textbox to txt file

    hi
    this is the situation

    i have a site in which i need to save the email addresses people provide in some file.

    What I Want-

    i want a textbox in which people write their email addresses(like mike@gmail.com) and hit the Submit button.

    this should save their email addresses in another text file(reg.txt) on my site. It may save anywhere actually.

    Also, After they click Submit, they should be taken to some other webpage on my site.

    Thanks in advance,
    sorry for my grammer

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    HTML can't do this either. You need to use a server side language like php or asp.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Jul 2008
    Posts
    71
    Thanks
    7
    Thanked 3 Times in 3 Posts
    I'm just curious, I know a bit of java (and this can be done), but can this be done in JS (which i don't know, hence my question)?

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Nope can't be done in JS either.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok, then please tell me some alterrnative method

  • #6
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts
    Well it needs to be done with a server-side language such as php. Then you can use javascript to re-direct the user to another page.

    saving email

    http://www.php.net

    for the javascript

    Code:
    <script type="text/javascript">
    <!--
    function Redirect()
    {
    location.href='http://newdomain.com/';
    }
    //-->
    </script>
    Code:
    <input name="Submit" type="submit" value="Submit" onclick="Redirect();" />
    Last edited by jcdevelopment; 07-18-2008 at 05:14 PM.

  • #7
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i read "saving email" but could not understand it.
    it needs some extra coding which i can't do.

    can you please give the code i should put in my site

    thanks in advance


  •  

    Posting Permissions

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