i need 2 action pages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Lflagg
    Sergeant First Class

    • Aug 2007
    • 51

    i need 2 action pages

    hi, i have a website where i have possible clients and employees fill up a form. once they submit the form i want the same action page to appear, although with different emails (for the form info to go to).
    how do i do this? do i need to create 2 different action [ages? can i call them different?
    thanks.
  • Watdaflip
    Major General

    • Sep 2005
    • 2116

    #2
    Re: i need 2 action pages

    That would depend on how you do it. If you add something like a radio button or a drop down box that will have the user select if they are a client or employee, you can have the script determine the email based on that. You can setup a form on two pages (say client.html and employee.html) and have a hidden field to distinguish which email to use. You don't have to have two action pages. If you post the php script you have on the action page I can make a change to it so to determine which email to use. Just need to know if you want to keep the forms separate for the clients and employees, or if it doesn't matter if they select which they are.

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

    Comment

    • Lflagg
      Sergeant First Class

      • Aug 2007
      • 51

      #3
      Re: i need 2 action pages

      yes, i need 2 different forms because they are 2 different pages with different information.
      this is the code i already have for the action page.

      <?PHP
      $mailto = "seniorhelpers******.com";
      $email = $HTTP_POST_VARS['email'];
      if ($email == "") {
      $email = $mailto;
      }
      $mailsubj = "Caregiver Employment Submission Form";
      $mailhead = "From: $email\n";
      reset ($HTTP_POST_VARS);
      $mailbody = "first, Last, phone_number, second_number, city, state, zip,how_hear_about_us, years_experience,cna,hha,companion,hours_available ,full_time, part_time,day_shift,Night_shift, weekends,live_in,flexible,have_car,email,drives,co mments:\n";
      while (list ($key, $val) = each ($HTTP_POST_VARS))
      {
      if ($key!="submit")
      {
      $mailbody .= "$key : $val\n";
      }
      }
      mail($mailto, $mailsubj, $mailbody, $mailhead);
      ?>

      i don't remember who was it, but they sent me another code so i can see the different values like cna,hha,companion,hours_available,full_time, part_time,day_shift,Night_shift, weekends,live_in,flexible that need to be checked with checkboxes. the code above does not show if they were checked or not. i tried the new code i was given but for some reason i didn't receive the email with the info submitted.

      Comment

      Working...
      X