Jump to content

[SOLVED] Drop down submit - get/post


andrewgarn

Recommended Posts

Ok well i have a drop down box which needs to set post or get data to the same page.

 

<form name="skill" method="get" action="ranking.php">
    <SELECT onchange=submit() NAME="view">
    <OPTION VALUE="op1">op1</OPTION>
    <OPTION VALUE="op2">op2</OPTION>
    </SELECT>

 

This reloads the same page with this in the address bar:

 

ranking.php?view=op1

 

how do i change it so the page recognises the address bar variable and uses it here:

 

if(isset($_GET["cmd"])) {
if($_GET["cmd"]=="view" || $_POST["cmd"]=="view") {

 

 

Link to comment
https://forums.phpfreaks.com/topic/113102-solved-drop-down-submit-getpost/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.