•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,923 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,725 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 269 | Replies: 4
![]() |
•
•
Join Date: Jul 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Is anyone who kan show me how I can send more than 2 parameters to another page? I having trouble with this. I have a search in a page.( navigation.php). Here is a dropdown. I want to send the dropdow parameter with the search word to a page called (search.php) page.
------------------------------------------------------------------------------
---------------------------------------------------------------------------
Thanks for anyone will help me.
Temax
------------------------------------------------------------------------------
php Syntax (Toggle Plain Text)
<form action="contents.php?id=11 & par1={$mot} & par2= {$ou}" method="post"> Recherche<br/> <input type="text" name="search"/><br/> <select name="fields"> <option>Actualité</option> <option>Annonces</option> <option>Culture</option> <option>Ecrivains</option> <option>Musique</option> <option>Art</option> <option>Contes</option> </select> <input type="submit" name="submit" value="chercher"/> </form> <?php if(isset($_POST['submit'])) { $mot = $_GET['name']; $ou = $_GET['fields'];
---------------------------------------------------------------------------
Thanks for anyone will help me.
Temax
Last edited by peter_budo : 29 Days Ago at 8:51 am. Reason: Keep It Organized - please use [code] tags
Each option should have an associated value. For example:
should be
Also, if you want to add variables to the url, use method="get". This will automatically place the variables into the query string.
<option>Actualité</option>
<option value="Actualité">Actualité</option>
Lost time is never found again.
- Benjamin Franklin
- Benjamin Franklin
•
•
Join Date: Jul 2008
Location: Hyderabad,India.
Posts: 522
Reputation:
Rep Power: 2
Solved Threads: 53
by this line:
<select name="fields">
</select>
you can retrieve the option value by $_POST['fields'] ..
In form tag you should use action as action="search.php".
<select name="fields">
</select>
you can retrieve the option value by $_POST['fields'] ..
In form tag you should use action as action="search.php".
Champions Are Not SuperNatural,They Just Fought For One More Second When Every One Else Quit...Some times That One Second Of Effort Gives You The VICTORY...
I don't understand what you are trying to do. Will this not work for you?
php Syntax (Toggle Plain Text)
<form action="contents.php?id=11" method="get"> Recherche<br/> <input type="text" name="search"/><br/> <select name="fields"> <option>Actualité</option> <option>Annonces</option> <option>Culture</option> <option>Ecrivains</option> <option>Musique</option> <option>Art</option> <option>Contes</option> </select> <input type="submit" name="submit" value="chercher"/> </form> <?php if(isset($_GET['submit'])) { $mot = $_GET['search']; $ou = $_GET['fields']; echo "mot=$mot<br>"; echo "ou=$ou"; } ?>
Lost time is never found again.
- Benjamin Franklin
- Benjamin Franklin
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Similar Threads
- Updated : Simple ASP.Net Login Page (ASP.NET)
- send parameters from page to page! (ASP.NET)
- parameter passing thru on click for different buttons (ASP)
- How to send request parameter to included jsp (JSP)
- how to send data in POST method using javascript (JavaScript / DHTML / AJAX)
- ASP.NET Registration Page (ASP.NET)
- Need to make my program access a web page automatic when user opens program (C)
Other Threads in the PHP Forum
- Previous Thread: wana learn PHP
- Next Thread: setting default value to DropDown Menu using PHP


Linear Mode