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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:05:04+00:00 2026-06-02T04:05:04+00:00

I am trying to pass vars from a form using drop down lists, that

  • 0

I am trying to pass vars from a form using drop down lists, that are populated by a query. It currently goes to result.php

<form action="result.php" method="post">

<SELECT NAME=Model class="normal"> 
<OPTION VALUE=0>Phone
<?=$model_o?> 
</SELECT> 

<SELECT NAME=Mins  class="small"> 
<OPTION VALUE=0>Mins
<?=$minutes_o?> 
</SELECT> 

<SELECT NAME=Texts class="small"> 
<OPTION VALUE=0>Texts
<?=$texts_o?> 
</SELECT> 

<SELECT NAME=Freegifts class="big"> 
<OPTION VALUE=0>Choose Free Gifts 
<?=$freegifts_o?> 
</SELECT> 

<SELECT NAME=Network class="normal"> 
<OPTION VALUE=0>Network 
<?=$network_name_o?> 
</SELECT> 

<SELECT NAME=Merchant class="normal"> 
<OPTION VALUE=0>Contract/Prepay 
<?=$merchant_category_o?> 
</SELECT> 
<br>
<button type="submit" value="search phones" class="red"><span>Sumbit</span></button>

</form>

However, what I want it to do is pass any variables from each drop down to the URL, only if a option is selected.

For example, if Model is selected it will pass the variable on to the URL when submit is select e.g. result.php?model=iphone and if both a model and mins is selected the URL would something like e.g. result.php?model=iphone&mins=500

I hope this makes sense as I am having difficulties explaining what I am actually trying to active.

Thanks in advance 🙂

  • 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-06-02T04:05:06+00:00Added an answer on June 2, 2026 at 4:05 am

    Since you’re using GET, you can’t have it only send form fields that have data associated with them. Using GET will send everything about the form, including all fields, even if they don’t have any data. Are you able to parse it with Javascript or perhaps use POST instead?

    Clarification
    I say you’re using GET despite your form tag indicating POST because of your follow up (result.php?model….).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to pass parameters from Visual Studio using VB.net to a Crystal
Iam trying to pass dynamic argument values i.e username from request using spring ioc.But
im trying to pass back from a user control a list of strings that
Im trying to pass an array that I already found by a query into
I'm currently trying to pass values using an AJAX request to a server side
I’m using drupal to create some custom form that submit to a third party,
Im trying to pass some variables from the URL to the PHP script. Now
I trying to pass a DateTime object as a query string parameter to a
Trying to pass in a value for a input in a form seems to
im trying to pass some parameters from my a4j:mediaOutput to my bean. I can

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.