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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.