toolman Posted May 17, 2016 Share Posted May 17, 2016 Hi there, I have a form which I would like to append a variable to the end of the URL after it is submitted. To do this, I would like to use a select drop down: <select id="ddl" name="term"> <option selected="selected" value="all">Please Select...</option><option value="1">Option 1</option><option value="2">Option 2</option><option value="3">Option 3</option><option value="4">Option 4</option><option value="5">Option 5</option> </select> The variable I would like to add to the end of the URL would be: &option=1, &option=2 etc depending on the selected item. How would I go about doing this? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/301199-append-attribute-to-end-of-form-action-url/ Share on other sites More sharing options...
Jacques1 Posted May 17, 2016 Share Posted May 17, 2016 If the form uses the GET method, all parameters are automatically appended to the target URL in the format name=value. Quote Link to comment https://forums.phpfreaks.com/topic/301199-append-attribute-to-end-of-form-action-url/#findComment-1533037 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.