Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6382273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:30:06+00:00 2026-05-25T02:30:06+00:00

I have been looking for a way to set up what I thought would

  • 0

I have been looking for a way to set up what I thought would be a simple form and redirect using php. I have found similar ideas though none are answered or end up being too different to work for my situation. I am very new to this so excuse my ignorance on the subject. Any help, even a point in the right direction is greatly appreciated.

I want to set up a form with one text box (for them to enter their name) and one drop down box that will have a list of school names. The user should enter their name, choose their school and then click go or submit.

Once done I want the form to do two things. Send an email with the persons name to a predefined email address (will always be the same email address) and then redirect the page depending on the school chosen in the drop down box. Basically, email sent to me with persons name and school 1 would go to http://www.address1.com, school 2 would go to http://www.address2.com etc. By the time site is complete I may end up with 30-40 schools though will only end up with 10-12 address destinations as some schools will be redirected to the same site addresses.

Once again thank you for any help that you can offer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:30:06+00:00Added an answer on May 25, 2026 at 2:30 am

    Hope it helps:

    <?php
    
    if(isset($_POST['submit']))
    {
        mail('you@example.com','Some subject',$_POST['name']);
        switch($_POST['school'])
        {
          case 'school1':
            header('Location: http://school1.com');
            break;
          case 'school2':
            header('Location: http://school2.com');
            break;
        }
    }
    
    ?>
    
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
        <label for="name">Name:</label> <input name="name" type="text" id="name" />
        <label for="school">School:</label>
        <select id="school" name="school">
            <option value="school1">School1</option>
            <option value="school2">School2</option>
        </select>
        <input type="submit" name="submit" value="Submit" />
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking for a way to remove an attachment from Jira using
I have been looking for a way to get rid of the nasty black
I have been looking for a way to allow users to manually override geolocation
I've been struggling looking for an understandable way to do this. I have four
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
Im using a Core Data model for my iPhone app. I have been looking
I have been looking into benchmarking lately, I have always been interested in logging
I have been looking at a few posts on SO about how to deserialize
i have been looking around to try and work out how to pass 2
I have been looking into IKVMing Apache's FOP project to use with our .NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.