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 7572847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:02:00+00:00 2026-05-30T16:02:00+00:00

I have setup a form that allows a user to make selections from drop-down

  • 0

I have setup a form that allows a user to make selections from drop-down lists, and clicking the submit button will redirect them to the appropriate page based off of their selections. Here is the PHP:

<?PHP
function redirect($where){ 
header("Location: $where");
}
if ($_REQUEST['os1'] == 'xp' && $_REQUEST['browser'] == 'ffx'){
redirect('http://mysite.com/index.php/prodemo/prodemo-categories/73-prodemo-xp-        firefox');
}elseif($_REQUEST['os1'] == 'xp' && $_REQUEST['browser'] == 'ie8'){
redirect('http://mysite.com/index.php/prodemo/prodemo-categories/72-prodemo-xp-ie');
}elseif($_REQUEST['os1'] == 'win7' && $_REQUEST['browser'] == 'ie8'){
redirect('http://mysite.com/index.php/prodemo/prodemo-categories/74-prodemo-win7-ie');
}elseif($_REQUEST['os1'] == 'win7' && $_REQUEST['browser'] == 'ffx'){
redirect('http://mysite.com/index.php/prodemo/prodemo-categories/75-prodemo-win7-  firefox');

}
?>

I am manually telling the query where to take the user.

My dilemma is that I want a simple line that says:
“Hi, _. How can I help you?”

The blank would be filled in by the name that is inputted on the form as the Caller’s name.
Here is an example of the form:

<form action="" method="post" name="form1">
Caller's Name: <input type="text" name="callersname" /><br />
<select name="os1">     <option selected="selected" value="xp">XP</option> 
<option value="win7">Win7</option>    </select> <br />
<select name="browser"> <option selected="selected"    value="ie8">IE8</option> 
<option value="ffx">Firefox</option></select> <br />
<input   type="submit" value="Next" />

I’m very new to PHP. If I create a PHP page to post the caller’s name, then how do I avoid the page redirecting to that php page instead of the redirect I have manually setup with the drop-down menu options selected?

Thanks for any advixce

  • 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-30T16:02:01+00:00Added an answer on May 30, 2026 at 4:02 pm

    If you want to store the user’s name on a page other than the first page or the same page that is processing the form values (IE the script that’s getting the redirect) you want to store that information either in a database, or more simply in a session.

    First, initialize the session on each page where you need to pull that information from:

    session_start();
    

    Then, create a session variable (unique to every user/browser) like so:

    $_SESSION['user_name'] = $_REQUEST['callersname'];
    

    Now, on the page you wish to retrieve their name (IE Hi ) just do so like this:

    echo "Hi {$_SESSION['callersname']} welcome to mcdonalds how may I help you?";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The Setup I have a (rather standard) form that allows a user to create
I have a product registration form that allows the user to add additional product
I have a django form that allows a user to select multiple options: CARDS
I have setup jQuery validation on form, The validation currently tests that the telephone
I have an events form that allows someone to add a new event. An
I'm using ASP.Net/C# and I have a form that allows people to add information
I'm currently trying to make a form called countcash that allows users to input
I have the following admin setup so that I can add/edit a user and
I have a method set up that uses jquery form for a file upload
We have got a setup where users can either use a web-based form or

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.