GetReady Posted April 4, 2010 Share Posted April 4, 2010 Hi, Im pretty new to this whole scene so am not 100% sure how i would go about this, Basically currently the users of my site would select what "class" they want to chose via a drop down menu selection as shown below, i wish to change this to instead of it being done via this it would be done via a <input type="Submit" value="Select As My Class"><br><br> do you have any idea if this is possible? and if so how would i go about it, Any help will be greatly appreciated, Thanks. <td>Desired class:</td> <td> <select name="class"> <? for ($i=0; $i<count($conf["class"]);$i++){ echo "<option value=$i "; if ((strpos ( $cgi['join'], $conf['class'][$i]['name'])!== false)||($cgi['class']==$i)) { echo " selected "; } echo " >{$conf['class'][$i]['name']}</option> "; } ?> </select> </td> </tr> Quote Link to comment Share on other sites More sharing options...
the182guy Posted April 4, 2010 Share Posted April 4, 2010 Not quite sure what you're asking... do you want a seperate submit button for each class? Quote Link to comment Share on other sites More sharing options...
GetReady Posted April 4, 2010 Author Share Posted April 4, 2010 Sorry yea thats what im aiming for if its possible after the class is chosen it would then redirect them to welcome.php is there any way to do this? Thanks. Quote Link to comment Share on other sites More sharing options...
GetReady Posted April 4, 2010 Author Share Posted April 4, 2010 i was attempting to do this and tried <form action="welcome.php" method="post"> <value="1" name="class" /> <input type="submit" /> </form> i dont think im far wrong but im not 100% any ideas? Quote Link to comment Share on other sites More sharing options...
ignace Posted April 5, 2010 Share Posted April 5, 2010 You are looking for: <button type="submit" name="class" value="myClass">Select as class</button> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.