SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict eddiembabaali's Avatar
    Join Date
    Mar 2001
    Location
    USA, Philadelphia
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    form action question

    Is it possible to have a web form with two different action scripts? I use a standard script for handling mail but I would like a visitor redirected to another page if he has entered some variables which will be checked by the other page ..

    SOme thing like

    Visitor enters site ---- fills in survey form and requests to view newsletter ...

    send survey form to my usual form handling script ...

    Form handling script has option for redirect page ....

    redirect visitor to online version of newsletter IF .. he supplied an email address and name ...
    Last edited by eddiembabaali; Jun 1, 2001 at 07:57.
    cd pub \r; more beer

    Eddie

  2. #2
    What's HTML?
    Join Date
    May 2001
    Location
    San Diego, CA
    Posts
    1,701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your newsletter subscription script probably already checks whether or not the user submitted valid information (name and email). So that would eliminate the need for the IF statement, because you already know that the user entered their email address.

    Then you can just redirect the user to your desired page by using a simple meta-refresh.

    You could also edit the script (I'm assuming its PHP) to do exactly what you want. If it's just a standard form-to-mail script it shouldn't be to hard to hack it up.
    Ryan Kuhle - A Proud Advisor - Got Questions? Just Ask!
    Get your website started for less than $20! Click Here

  3. #3
    SitePoint Addict eddiembabaali's Avatar
    Join Date
    Mar 2001
    Location
    USA, Philadelphia
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the tip .. I think I have the code working and was just confusing myself. I left the form action to the default form handling script and just passed on a variable to the redirect page in the URL ... It seems to be working well ....


    thanks again for your ideas..
    cd pub \r; more beer

    Eddie


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
  •